superstore 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/superstore/timestamps.rb +1 -1
- data/superstore.gemspec +1 -1
- data/test/unit/timestamps_test.rb +17 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e540e117a43369a7a1776533365a423982b5ad61
|
4
|
+
data.tar.gz: 903bc8a9def4a329f9e9ee054101e69364a9f3e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c1b861cc83c89c001983c526de0b188d4b0ef5545039bd27dfdaedcdc73749170abb75999a1f984ea2879c76c4afffabfc4e83feee5b20dd6efc595fcf65c92
|
7
|
+
data.tar.gz: 9ee34533c2261152b867b13f89d49254f1eb36de5c2a496117589c8dec713089deee9fcd04f0cd7ad0eb51fb7c6d8bc328e031a164046447dc6cfcd97e29796f
|
data/superstore.gemspec
CHANGED
@@ -8,14 +8,22 @@ class Superstore::TimestampsTest < Superstore::TestCase
|
|
8
8
|
assert_in_delta Time.now.to_i, issue.updated_at.to_i, 3
|
9
9
|
end
|
10
10
|
|
11
|
-
test 'updated_at set on change' do
|
11
|
+
test 'updated_at set nil on change' do
|
12
12
|
issue = Issue.create
|
13
13
|
|
14
14
|
issue.updated_at = nil
|
15
15
|
issue.description = 'lol'
|
16
16
|
issue.save
|
17
17
|
|
18
|
-
|
18
|
+
assert issue.updated_at.nil?
|
19
|
+
end
|
20
|
+
|
21
|
+
test 'updated_at can be set on change' do
|
22
|
+
issue = Issue.create
|
23
|
+
|
24
|
+
issue.update_attribute :updated_at, 30.days.ago
|
25
|
+
|
26
|
+
assert_in_delta 30.days.ago.to_i, issue.updated_at.to_i, 3
|
19
27
|
end
|
20
28
|
|
21
29
|
test 'created_at sets only if nil' do
|
@@ -24,4 +32,11 @@ class Superstore::TimestampsTest < Superstore::TestCase
|
|
24
32
|
|
25
33
|
assert_equal time, issue.created_at
|
26
34
|
end
|
35
|
+
|
36
|
+
test 'updated_at sets only if nil' do
|
37
|
+
time = 5.days.ago
|
38
|
+
issue = Issue.create updated_at: time
|
39
|
+
|
40
|
+
assert_equal time, issue.updated_at
|
41
|
+
end
|
27
42
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: superstore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Koziarski
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-07-
|
12
|
+
date: 2014-07-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|