Permalink
Browse files

Add test for failing authorize due to missing app_key

  • Loading branch information...
1 parent d10ad8e commit 5edfcfddccfa865b522536165b458d139ea7503c @jaimeiniesta jaimeiniesta committed Mar 2, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 test/remote_test.rb
View
@@ -28,7 +28,13 @@ def test_successful_authorize
end
end
- def test_failed_authorize
+ def test_failed_authorize_due_to_missing_app_key
+ response = @client.authorize(:app_id => @app_ids[0])
+ assert !response.success?
+ assert_equal 'application key is missing', response.error_message
+ end
+
+ def test_failed_authorize_due_to_invalid_app_id
response = @client.authorize(:app_id => 'invalid-id')
assert !response.success?
assert_equal 'application_not_found', response.error_code

0 comments on commit 5edfcfd

Please sign in to comment.