Allow to use custom token for lock

This commit is contained in:
Vokhmin Alexey V
2016-10-05 13:47:10 +03:00
parent a23282dcc6
commit 05661e143c
3 changed files with 11 additions and 4 deletions

View File

@@ -31,6 +31,12 @@ module ClientTests
assert_equal false, locked
end
def test_lock_with_custom_token
token = 'foo-bar'
lock = @client.lock token
assert_equal lock, token
end
def test_empty_lock_on_invalid_data
@client.send(:initial_set, "bad value")
assert_equal false, @client.locked?