Ampers - Kate, Steffany, Brittany, Lily#22
Ampers - Kate, Steffany, Brittany, Lily#22lillers1122 wants to merge 343 commits intoAda-C9:masterfrom
Conversation
merging to update schema
…reated isn't working yet
…troller so that a new pending order is created for each new guest
…oducts Feature_Adds more db seeds and db updates
Adding uid to order
…ugh I did make one for self.merchant_products
Category controller tests + new form
…OrderItemsTesting
hotfix for showing mechant shops while logged out
Feature all users page
Order order items testing
changes title of site
changed new method in product controller
bEtsyWhat We're Looking For
Only the person who submitted the PR will get an email about this feedback. Please let the rest of your team know about it. |
| end | ||
|
|
||
| describe "new" do | ||
| it "succeeds" do |
There was a problem hiding this comment.
Shouldn't you be making sure that guest users can't create a new category? Guests shouldn't be able to get to the form.
| end | ||
| end | ||
|
|
||
| describe "create" do |
There was a problem hiding this comment.
You also need to verify that guest users can't create categories, so you're missing some tests.
| @@ -0,0 +1,38 @@ | |||
| class Product < ApplicationRecord | |||
There was a problem hiding this comment.
Why is this model in the test/controllers folder?
|
|
||
| describe "new" do | ||
| it "succeeds" do | ||
| user = users(:ada) |
There was a problem hiding this comment.
Guest users shouldn't be able to get to the form to create a new product.
|
|
||
| describe "create" do | ||
| it "creates a product with valid data" do | ||
| Product.count.must_equal 3 |
There was a problem hiding this comment.
You also haven't ensured that people who haven't logged in can create products.
|
|
||
| describe "show" do | ||
| it "succeeds" do | ||
| get product_path(products(:cat)) |
There was a problem hiding this comment.
This test fails because it can't find the merchant.
| proc { | ||
| put order_path(order.id), params: { order: order_info } | ||
| product = Product.find(item.product_id) | ||
| }.must_change 'product.stock', -2 |
There was a problem hiding this comment.
This test is failing, probably because it's not creating an orderItem properly.
| @@ -0,0 +1,76 @@ | |||
| class ProductsController < ApplicationController | |||
There was a problem hiding this comment.
In these controllers you have no security. Nothing prevents guest users from getting into mischief.
| <div class="body-wrapper"> | ||
| <header class="clearfix"> | ||
| <section class="site-title"> | ||
| <h1>Welcome To Petsy</h1> |
There was a problem hiding this comment.
Shouldn't this header be a link to the homepage.
| </head> | ||
|
|
||
| <body> | ||
| <div class="body-wrapper"> |
There was a problem hiding this comment.
What purpose does the body-wrapper div element perform. Why not just style the body element?
bEtsy
Congratulations! You're submitting your assignment! These comprehension questions should be answered by all members of your team, not by a single teammate.
Comprehension Questions