commendo 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/commendo/tag_set.rb +1 -1
- data/lib/commendo/version.rb +1 -1
- data/test/tag_set_test.rb +13 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e46e056067c3c4af5ab6315d8145b811286a465c
|
4
|
+
data.tar.gz: 5392a1bbe9b1dbeb10f10f3a136d01d2a5b6f53d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38ff1874cd0fea432da1e3cc0303c674bef437c689cb4bf47e7f43d1072aaf6569dbc53727fdfffd9e7479f18912a86e49fd1c6f9350ac09c5a5d2acfa53aa7d
|
7
|
+
data.tar.gz: a1c512f261e1b2b1cb704a5b6ba41b1d172b9191b17c04a031e54366e664f1485ecf1e71c2a6993b7cfa49b35ffd383c571e464703fb1eccdcfb088bad3c2c19
|
data/CHANGELOG.md
CHANGED
data/lib/commendo/tag_set.rb
CHANGED
data/lib/commendo/version.rb
CHANGED
data/test/tag_set_test.rb
CHANGED
@@ -31,6 +31,19 @@ module Commendo
|
|
31
31
|
assert_equal ['qip', 'qux'], ts.get(1)
|
32
32
|
end
|
33
33
|
|
34
|
+
def test_sets_tags_when_empty
|
35
|
+
redis = Redis.new(db: 15)
|
36
|
+
redis.flushdb
|
37
|
+
ts = TagSet.new(redis, 'TagSetTest')
|
38
|
+
ts.set(1, 'foo', 'bar', 'baz')
|
39
|
+
ts.set(2, 'qux', 'qip')
|
40
|
+
assert_equal ['bar', 'baz', 'foo'], ts.get(1)
|
41
|
+
assert_equal ['qip', 'qux'], ts.get(2)
|
42
|
+
ts.set(1, *[])
|
43
|
+
assert_equal [], ts.get(1)
|
44
|
+
assert_equal ['qip', 'qux'], ts.get(2)
|
45
|
+
end
|
46
|
+
|
34
47
|
def test_deletes_tags_for_resource
|
35
48
|
redis = Redis.new(db: 15)
|
36
49
|
redis.flushdb
|