properly throw lock LockClientError

This commit is contained in:
Nick Elser
2015-04-12 20:47:35 -07:00
parent 8166c6b51d
commit 1aacc0c1a1
5 changed files with 13 additions and 10 deletions

View File

@@ -11,6 +11,12 @@ module ClientTests
assert_equal "Client required", exception.message
end
def test_throws_failed_error_on_bad_client
assert_raises(Suo::LockClientError) do
@klass.lock(TEST_KEY, 1, client: {})
end
end
def test_class_single_resource_locking
lock1 = @klass.lock(TEST_KEY, 1, client: @klass_client)
refute_nil lock1