test/redis/store/ttl_test.rb in redis-store-1.1.7 vs test/redis/store/ttl_test.rb in redis-store-1.2.0.pre

- old
+ new

@@ -64,17 +64,25 @@ describe '#set' do describe 'without options' do it 'must call super with key and value' do redis.set(key, mock_value) - redis.has_set?(key, mock_value).must_equal true + redis.has_set?(key, mock_value, nil).must_equal true end end describe 'with options' do it 'must call setex with proper expiry and set raw to true' do redis.set(key, mock_value, options) redis.has_setex?(key, options[:expire_after], mock_value, :raw => true).must_equal true + end + end + + describe 'with nx and ex option' do + it 'must call super with key and value and options' do + set_options = {nx: true, ex: 3600} + redis.set(key, mock_value, set_options) + redis.has_set?(key, mock_value, set_options).must_equal true end end end describe '#setnx' do