-
Notifications
You must be signed in to change notification settings - Fork 42
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
Pipes - Iuliia - Muncher #46
base: master
Are you sure you want to change the base?
Conversation
API MuncherWhat We're Looking For
|
|
||
must_respond_with :success | ||
end | ||
end |
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.
There are some interesting test cases around paging that you're missing here:
- Does the page still render if paging parameters are passed?
- What if the paging parameters are invalid (negative number, etc)?
- What if the paging parameters take you past the end of the available search results?
describe "show_recipe" do | ||
it "returns data for a recipe" do | ||
VCR.use_cassette("recipe") do | ||
uri = "637913ec61d9da69eb451818c3293df2" |
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 would also like to see a negative test case here - what happens if the URI is invalid?
|
||
it "raises an ApiError when the credentials are bad" do | ||
VCR.use_cassette("no recipes") do | ||
proc { EdamamApiWrapper.search_recipes("fish", "invalid_app_id", "invalid_app_key") }.must_raise EdamamApiWrapper::ApiError |
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.
What about for a search with no hits?
API Muncher
Congratulations! You're submitting your assignment!
Comprehension Questions