-
Notifications
You must be signed in to change notification settings - Fork 7
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
Team Quartzy- Annalee, Meighan, Riley, Audrey #16
base: quartzy/master
Are you sure you want to change the base?
Conversation
describe "GET 'cart'" do | ||
it "sets cart status to empty if there is no order_id in session" do | ||
get :cart, {}, {:order_id => nil} | ||
expect(@cart_status).to eq(nil) |
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 believe this @cart_status
is not the same @cart_status
in your orders_controller. Specifically this is an instance variable for the RSpec test, so it will be nil forever until it is assigned in the above let
block.
Congrats on completing the Betsy project! The app works wonderfully and you all obviously have a good grasp on complicated logic in rails. Here are some things I noticed overall that could use some improvement: • Naming: Try not to use letters as variables. It's always best to be descriptive when assigning names to data or functions so that your logic is clearer. CODE ON! ⭐ ✌️ |
expect(subject).to render_template :index | ||
end | ||
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.
I don't think you need to create all these users, categories, and products to test if the index page renders. In any case, what would happen if, say, there were no products to display?
EDIT: Looking at your welcome controller, I see why you needed to create all these. Still might be good to have logic that allows for edge cases like no products to display.
<h2 class="merchant-name"> | ||
<%= link_to "#{cat.name}", category_path(cat), class: 'category-box' %> | ||
</h2> | ||
<% cat.top(3).each do |p| %> |
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, it's better to use full variable names instead of letters.
App deployed on Heroku:
http://quartzy.herokuapp.com/
Completed primary requirements.
92.6% rspec coverage
Code could be much dryer and neater in some areas, but we feel we accomplished a lot of work.