forked from AdaGold/api-muncher
-
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
Carets- Julia Meier- API Muncher #25
Open
julmeier
wants to merge
39
commits into
Ada-C8:master
Choose a base branch
from
julmeier:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+31,120
−0
Open
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
43689ef
initial setup. copied lib and lib_test files from previous project. m…
julmeier b2d35cc
added recipes_controller
julmeier 86dde1e
added config.autoload_paths line to the config/application.rb file
julmeier b3d54f1
continued testing of edamam_api_wrapper. Found some leftover text aft…
julmeier 17fea3b
created controller methods and made index and search html pages. Was …
julmeier 7b7cb33
made show controller, route and view
julmeier 96a423f
created show_recipe method. modified list_recipes method to take in t…
julmeier 86d29f0
save of number_of_recipes/10 loop in the search view. experimenting w…
julmeier 5d36257
figured out how to pass the from/to parameters to the controller. Abo…
julmeier a7e2304
some nuggets of wisdom from dee about how to inject from/to into the …
julmeier 48e4dd3
got help from dee to finish with pagination. found out that the API o…
julmeier b81cdc9
added additional elements to show page. will start to refactor contro…
julmeier cb93b6f
added logic to search view to display the pagination correctly when t…
julmeier d9a40cf
additional refactoring
julmeier 8484a07
commented out require stuff at the top of controllers
julmeier 2a57fd1
changed line 12 in search.html to consider nil class based on heroku …
julmeier dae937d
added required lines to the application.rb and production.rb based on…
julmeier 737276d
changed line 12 in search view to be &&
julmeier a533fe2
removed the portion of the view page that displays the pagination bec…
julmeier 6e27d54
added back in the pagination view code. Took it out to see if it was …
julmeier 2401968
added require dependency to the API controller too
julmeier cf5b4c4
added styling to the form and search pages. having issue oissue of wr…
julmeier f0208ef
continued styling on show and search pages. The Health Information da…
julmeier 2a3f897
can't get the photo captions to wrap
julmeier a5b9107
fixed columns on the show page so that all content lines up correctly
julmeier 86650bd
heroku is not uploading my background image for the search headers. a…
julmeier fc33205
removed config.assets.compile = false from production.rb
julmeier b236ded
finished all required styling
julmeier 823c83a
centered grid on results page. on an xlarge screen, the home page has…
julmeier 3fda7b6
tried to fix gap between footer and image on home page- no go
julmeier 868b12d
changed name to What's Cookin'?
julmeier d628354
fixed CSS mistakes that were preventing upload to heroku
julmeier 5f1550b
controller testing ongoing. saving because computer is getting blippy
julmeier f5fe8d5
changed failure case from @keywords.nil? to @keywords.blank? after te…
julmeier 29bbac7
additional controller tests
julmeier f4f1af7
additional model and controller testing
julmeier d86e89f
Chris helped me get lib tests to work by recreating postgres. Fixed l…
julmeier 25d67ab
changed CSS body to 100% height which fixed smartphone issues with la…
julmeier 8d869b2
changed footer CSS on results page so that it's fixed to the bottom (…
julmeier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
controller testing ongoing. saving because computer is getting blippy
commit 5f1550b5977e303387b64babaf158e2fd64ff1b2
There are no files selected for viewing
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,22 +12,21 @@ | |
end | ||
|
||
describe "search" do | ||
it "can get the initial search page (recipes 1-10)" do | ||
keywords = "lemon chicken" | ||
it "can get the initial search results page" do | ||
@keywords = "lemon chicken" | ||
VCR.use_cassette("recipes") do | ||
get recipes_search_path, params: keywords | ||
get recipes_search_path params:{keywords: "lemon chicken"} | ||
must_respond_with :success | ||
end | ||
end | ||
|
||
it "returns success when recipes match the search term(s) and page parameters are provided" do | ||
it "redirects to the home page if the user enters " | ||
end | ||
|
||
describe "search by page (i.e. pagination)" do | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good sets of tests. |
||
it "returns success when passed a keyword and recipe numbers (from, to)" do | ||
VCR.use_cassette("recipes") do | ||
@keywords = "lemon chicken" | ||
get recipes_search_path, params: @keywords | ||
# params[:keywords] = "lemon chicken" | ||
# params[:from] = 30 | ||
# params[:to] = 39 | ||
get search_by_page_path(keywords: @keywords, from: 30, to: 39) | ||
get recipes_search_path params:{keywords: "lemon chicken", from: 30, to: 39} | ||
must_respond_with :success | ||
end | ||
end | ||
|
This file contains 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
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.
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.
no flash notice?