Skip to content

Commit

Permalink
Added more test
Browse files Browse the repository at this point in the history
  • Loading branch information
guineveresaenger committed Oct 28, 2016
1 parent 72448b1 commit 4a60d50
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/controllers/orders_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class OrdersControllerTest < ActionController::TestCase
# order_one = orders(:one)
#
# assert_response :success
# assert_template :index
# # assert_template :index
#
# end
#
Expand Down
13 changes: 12 additions & 1 deletion test/controllers/reviews_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,16 @@ class ReviewsControllerTest < ActionController::TestCase
assert_redirected_to product_path(product_id)
end


test "cannot review own product" do
session[:merchant_id] = merchants(:one).id
product = products(:one)

post :create, {review: { rating: 3, product_id: product.id}, product_id: product.id }

assert_template :no_show
assert_response :success

end


end

0 comments on commit 4a60d50

Please sign in to comment.