Permalink
Browse files

sunionstore specs

  • Loading branch information...
1 parent 6629613 commit 4ef083bfa1c74920624ebd9700f64f8e777c713d @lp committed Jul 8, 2011
Showing with 14 additions and 0 deletions.
  1. +14 −0 spec/09_keyspace_sets_spec.coffee
@@ -151,4 +151,18 @@ describe 'redis-keyspace prefix for sets', () ->
expect(reply.length).toEqual(4)
expect(_.intersect(reply,['five','six','seven','eight']).length).toEqual(4)
done()
+ )
+ it 'should union sets and store results with sunionstore', () ->
+ runBlock 'sunionstore', (done) ->
+ client2.sunionstore('newset','myset','myset2', testAsync (error,reply) ->
+ expect(error).toBeNull()
+ expect(reply).toEqual(4)
+ done()
+ )
+ runBlock 'smembers to confirm sunionstore', (done) ->
+ client2.smembers('newset', testAsync (error,reply) ->
+ expect(error).toBeNull()
+ expect(reply.length).toEqual(4)
+ expect(_.intersect(reply,['five','six','seven','eight']).length).toEqual(4)
+ done()
)

0 comments on commit 4ef083b

Please sign in to comment.