-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add VCR to and improve all integration tests #132
Conversation
@@ -2,22 +2,28 @@ module Credentials | |||
module_function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace only in this file
@@ -32,7 +32,7 @@ def resource_server(resource_server_id) | |||
# @return [json] Returns the resource server. | |||
def create_resource_server(identifier, options = {}) | |||
raise Auth0::InvalidParameter, 'Must supply a valid resource server id' if identifier.to_s.empty? | |||
if ['<', '>'].include?(options.fetch(:name, '')) | |||
if options.fetch(:name, '').index(/[<>]/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was not actually checking for what it was trying to check for
@@ -101,7 +101,7 @@ def delete_user(user_id) | |||
# @return [json] Returns the updated user. | |||
def patch_user(user_id, body) | |||
raise Auth0::MissingUserId, 'Must supply a valid user_id' if user_id.to_s.empty? | |||
raise Auth0::InvalidParameter, 'Must supply a valid body' if body.to_s.empty? | |||
raise Auth0::InvalidParameter, 'Must supply a valid body' if body.to_s.empty? || body.empty? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did not catch an empty hash
@@ -13,26 +13,6 @@ | |||
config.filter_run focus: true | |||
config.run_all_when_everything_filtered = true | |||
config.include Credentials | |||
config.after(:suite) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed unnecessary cleanup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay for the speed improvements!
000e2cc
to
a05c6bc
Compare
Add VCR HTTP recording to integration test suite. Specifically:
after(:suite)