-
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
Get all resource servers #155
Conversation
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.
@philomory - Looks great! Thank you for this ... couple of minor comments here.
Also, I recorded VCR cassettes for the integration tests. If you can commit these as well, I can merge this:
https://www.dropbox.com/s/tx9vnfksqjxiuvx/Auth0_Api_V2_ResourceServers.zip?dl=0
Drop these in spec/fixtures/vcr_cassettes
and CI tests should complete with HTTP calls turned off.
per_page: 1 | ||
) | ||
expect(results.first).to equal(results.last) | ||
expect(results.first).to eq(test_server) |
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.
This is not necessary, and is failing on my end when I run the integration tests on your branch. We're not pulling by any specific order here so the newest may (or may not) be the first one pulled.
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.
I've removed the expect(results.first).to eq(test_server)
line, which I believe is the only one you objected to. If you want me to remove that whole test about paging, though, I can do that instead.
spec/spec_helper.rb
Outdated
@@ -22,7 +22,7 @@ | |||
VCR.configure do |config| | |||
# Uncomment the line below to record new VCR cassettes. | |||
# When this is commented out, VCR will reject all outbound HTTP calls. | |||
# config.allow_http_connections_when_no_cassette = true | |||
config.allow_http_connections_when_no_cassette = true |
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.
Make sure to comment this back out so HTTP calls are not made.
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.
That's been commented-out again.
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.
Looks great! Thanks again for sticking with this.
Changes
Adds
Auth0::Api::V2::ResourceServers#resource_servers
method (and aliasget_resource_servers
) to fetch all Resource Servers in the tenant.References
Discussion in #154
Testing
Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.
(my testing was done on 2.4.4, not 2.6.0)
Checklist
master
when I run them, either