gotime-cassandra_object 2.7.5 → 2.7.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -39,14 +39,24 @@ class CassandraObject::Types::ArrayTypeTest < CassandraObject::Types::TestCase
|
|
39
39
|
assert_equal({'favorite_colors' => [['red'], []]}, issue.changes)
|
40
40
|
end
|
41
41
|
|
42
|
-
test 'unique array' do
|
42
|
+
test 'unique array removes nil' do
|
43
43
|
issue = TestIssue.create favorite_colors: ['blue', 'red', nil]
|
44
44
|
assert_equal ['blue', 'red'], issue.favorite_colors
|
45
|
+
end
|
45
46
|
|
47
|
+
test 'unique array uniquifies' do
|
48
|
+
issue = TestIssue.create favorite_colors: ['blue', 'red']
|
49
|
+
|
46
50
|
issue.favorite_colors = ['red', 'red', 'blue']
|
47
51
|
assert !issue.changed?
|
48
|
-
|
52
|
+
|
49
53
|
issue.favorite_colors = ['red', 'green']
|
50
54
|
assert issue.changed?
|
51
55
|
end
|
56
|
+
|
57
|
+
test 'unique array rescues argument error' do
|
58
|
+
issue = TestIssue.create favorite_colors: [1, 'red']
|
59
|
+
|
60
|
+
assert_equal [1, 'red'], issue.favorite_colors
|
61
|
+
end
|
52
62
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gotime-cassandra_object
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,7 +14,7 @@ date: 2011-09-07 00:00:00.000000000Z
|
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activemodel
|
17
|
-
requirement: &
|
17
|
+
requirement: &70215086256320 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: '3.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70215086256320
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: cassandra
|
28
|
-
requirement: &
|
28
|
+
requirement: &70215086255600 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: 0.12.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70215086255600
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: bundler
|
39
|
-
requirement: &
|
39
|
+
requirement: &70215086254540 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ~>
|
@@ -44,7 +44,7 @@ dependencies:
|
|
44
44
|
version: 1.0.0
|
45
45
|
type: :development
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *70215086254540
|
48
48
|
description: Cassandra ActiveModel
|
49
49
|
email: gems@gotime.com
|
50
50
|
executables: []
|