spec/pause/redis/adapter_spec.rb in pause-0.0.3 vs spec/pause/redis/adapter_spec.rb in pause-0.0.4

- old
+ new

@@ -51,11 +51,11 @@ let(:key) { "ipn:follow:123461234" } let(:blocked_key) { "b:#{key}" } let(:ttl) { 110000 } it "saves ip to redis with expiration" do - adapter.block(key, ttl) + adapter.rate_limit!(key, ttl) redis_conn.get(blocked_key).should_not be_nil redis_conn.ttl(blocked_key).should == ttl end end @@ -63,11 +63,11 @@ let(:key) { "ipn:follow:123461234" } let(:blocked_key) { "b:#{key}" } let(:ttl) { 110000 } it "should return true if blocked" do - adapter.block(key, ttl) - (!!redis_conn.get(blocked_key).should) == adapter.blocked?(key) + adapter.rate_limit!(key, ttl) + (!!redis_conn.get(blocked_key).should) == adapter.rate_limited?(key) end end describe "#white_key" do it "prefixes key" do