Skip to content

Commit

Permalink
sunionstore specs
Browse files Browse the repository at this point in the history
  • Loading branch information
Louis-Philippe Perron committed Jul 8, 2011
1 parent 6629613 commit 4ef083b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions spec/09_keyspace_sets_spec.coffee
Expand Up @@ -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.