Skip to content

Commit aac051a

Browse files
committed
Updating Network API server auth tests
1 parent 0aa7398 commit aac051a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/vonage/network_authentication/server_test.rb

+12
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,16 @@ def test_token_method
8686

8787
assert_equal sample_webhook_token, server.token(purpose: example_purpose, api_scope: example_api_scope, login_hint: example_login_hint)
8888
end
89+
90+
def test_token_method_without_purpose
91+
assert_raises(ArgumentError) { server.token(api_scope: example_api_scope, login_hint: example_login_hint) }
92+
end
93+
94+
def test_token_method_without_api_scope
95+
assert_raises(ArgumentError) { server.token(purpose: example_purpose, login_hint: example_login_hint) }
96+
end
97+
98+
def test_token_method_without_login_hint
99+
assert_raises(ArgumentError) { server.token(purpose: example_purpose, api_scope: example_api_scope) }
100+
end
89101
end

0 commit comments

Comments
 (0)