Open
Conversation
set up homepage, index and show pages
search box working on homepage
index page with link on label working. Show page is not
show is still not working
fixed controller, refactored some code in api_wrapper
fixed error in routes
Dionisia work
Dionisia work
show page finally done
tests done, all passing
API MuncherWhat We're Looking For
|
CheezItMan
reviewed
Nov 11, 2018
| end | ||
|
|
||
| describe "index" do | ||
| it "can get a list of recipes" do |
There was a problem hiding this comment.
You should also have a test a search result with nonsense like ^&* and "". In other words include negative cases.
| end | ||
|
|
||
| describe "show" do | ||
| it "can get show page for a valid recipe uri" do |
There was a problem hiding this comment.
Similar to the above, you should test the controller with an invalid id.
|
|
||
| it "returns empty list when query is unsuccessful" do | ||
| VCR.use_cassette("list_recipes") do | ||
| query = "waaaaaah" |
There was a problem hiding this comment.
I would also test it with an emptystring.
| end | ||
|
|
||
| it "can retrieve one recipe" do | ||
| VCR.use_cassette("show_recipe_detail") do |
There was a problem hiding this comment.
Like the controller, you should also test with an invalid URI.
| # binding.pry | ||
|
|
||
| # new_url = CGI.escape(url(id)) | ||
| data = HTTParty.get(url).first |
There was a problem hiding this comment.
You should have some sort of if statement which checks to see if the request was successful.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
API Muncher
Congratulations! You're submitting your assignment!
Comprehension Questions
lib? How would your project change if you needed to interact with more than one API (aka more than just the Edamam API)?