Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix quote controller test for mass-assignment protection

  • Loading branch information...
commit 2b6a95d16f07281978b3d618100882270c6d508c 1 parent ba912af
@mxey mxey authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 test/functional/quotes_controller_test.rb
View
5 test/functional/quotes_controller_test.rb
@@ -3,6 +3,7 @@
class QuotesControllerTest < ActionController::TestCase
setup do
@quote = quotes(:one)
+ @quote_attributes = @quote.attributes.slice(:raw_quote, :description)
end
test "should get index" do
@@ -18,7 +19,7 @@ class QuotesControllerTest < ActionController::TestCase
test "should create quote" do
assert_difference('Quote.count') do
- post :create, quote: @quote.attributes
+ post :create, quote: @quote_attributes
end
assert_redirected_to quote_path(assigns(:quote))
@@ -35,7 +36,7 @@ class QuotesControllerTest < ActionController::TestCase
end
test "should update quote" do
- put :update, id: @quote, quote: @quote.attributes
+ put :update, id: @quote, quote: @quote_attributes
assert_redirected_to quote_path(assigns(:quote))
end
Please sign in to comment.
Something went wrong with that request. Please try again.