Skip to content

Commit

Permalink
Improve SETNX test
Browse files Browse the repository at this point in the history
  • Loading branch information
pietern committed Feb 7, 2013
1 parent e427409 commit 61bb68f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/lint/strings.rb
Expand Up @@ -61,13 +61,13 @@ def test_getset
end

def test_setnx
r.set("foo", "s1")

assert_equal "s1", r.get("foo")
r.set("foo", "qux")
assert !r.setnx("foo", "bar")
assert_equal "qux", r.get("foo")

r.setnx("foo", "s2")

assert_equal "s1", r.get("foo")
r.del("foo")
assert r.setnx("foo", "bar")
assert_equal "bar", r.get("foo")
end

def test_incr
Expand Down

0 comments on commit 61bb68f

Please sign in to comment.