Skip to content
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 pagination and tests for Rules endpoint #117

Merged
merged 2 commits into from
Jul 10, 2018
Merged

Conversation

joshcanhelp
Copy link
Contributor

  • Add page and per_page parameters to Auth0::Api::V2::Rules::rules endpoint
  • Add unit and integration tests for this change
  • Remove sleep directives from the rules integration tests

stage: stage
stage: stage,
page: !page.nil? ? page.to_i : nil,
per_page: !page.nil? && !per_page.nil? ? per_page.to_i : nil
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to give this the same feedback as the other one where this logic is confusing to read through. I'm noticing the other params aren't being cast in any way. Can you elaborate more on why we are casting these vars?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I'm adding new params here, I was only casting the additions, not the others.

@joshcanhelp
Copy link
Contributor Author

@machuga - I should have done this before but ... I tested the params as strings and got the correct results. I'm not seeing any reason to cast these at all. Pushed that change (plus adding back a few of the sleep directives since I was getting a 429).

I'll make the same changes in #116

Copy link

@machuga machuga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@joshcanhelp joshcanhelp merged commit 22ef4a2 into master Jul 10, 2018
@joshcanhelp joshcanhelp deleted the add-pagination-rules branch July 10, 2018 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants