-
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
API-Muncher Marisa Morris #33
base: master
Are you sure you want to change the base?
Conversation
… up on pages that are not the homepage.
API MuncherWhat We're Looking For
|
test/lib/edamam_api_wrapper_test.rb
Outdated
|
||
describe "show_recipe" do | ||
|
||
it "Can show a requested recipe" 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.
What about a negative case?
@@ -0,0 +1,8 @@ | |||
require "test_helper" | |||
|
|||
class HomepageControllerTest < ActionDispatch::IntegrationTest |
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 should probably be removed.
require 'test_helper' | ||
|
||
# class RecipesControllerTest < ActionDispatch::IntegrationTest | ||
describe RecipesController 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.
Again negative-case tests are needed!
<div class="grid-x"> | ||
<div class="large-2 medium-1 small-3 cell"></div> | ||
|
||
<div class="large-8 medium-10 small-6 cell blah"> |
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.
blah
?
lib/edamam_api_wrapper.rb
Outdated
# MUST ENCODE THE SEARCH PARAMETER IN THE URL | ||
url = BASE_URL + "?r=" + (URI.encode(search)) | ||
|
||
data = HTTParty.get(url) |
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.
You need some error-detection here! What if data
or data[0]
are nil
?
API Muncher
Congratulations! You're submitting your assignment!
Comprehension Questions