aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2012-08-29 09:54:27 -0500
committerGuillermo Iguaran <guilleiguaran@gmail.com>2012-09-16 23:58:21 -0500
commit8cfe95d7194a1118f9950fe1d81a4e915cb929d6 (patch)
tree2d71aefbbda3e608627776693a0c915df58dbe20 /activemodel
parent978c568a7bffe354180aaefa471092182fed1015 (diff)
downloadrails-8cfe95d7194a1118f9950fe1d81a4e915cb929d6.tar.gz
rails-8cfe95d7194a1118f9950fe1d81a4e915cb929d6.tar.bz2
rails-8cfe95d7194a1118f9950fe1d81a4e915cb929d6.zip
Don't use assert_nothing_raised when assert_equal is used
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/test/cases/forbidden_attributes_protection_test.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/activemodel/test/cases/forbidden_attributes_protection_test.rb b/activemodel/test/cases/forbidden_attributes_protection_test.rb
index f6437333b0..3cb204a2c5 100644
--- a/activemodel/test/cases/forbidden_attributes_protection_test.rb
+++ b/activemodel/test/cases/forbidden_attributes_protection_test.rb
@@ -27,16 +27,10 @@ class ActiveModelMassUpdateProtectionTest < ActiveSupport::TestCase
test "permitted attributes can be used for mass updating" do
params = ProtectedParams.new({ "a" => "b" }).permit!
- assert_nothing_raised do
- assert_equal({ "a" => "b" },
- Account.new.sanitize_for_mass_assignment(params))
- end
+ assert_equal({ "a" => "b" }, Account.new.sanitize_for_mass_assignment(params))
end
test "regular attributes should still be allowed" do
- assert_nothing_raised do
- assert_equal({ a: "b" },
- Account.new.sanitize_for_mass_assignment(a: "b"))
- end
+ assert_equal({ a: "b" }, Account.new.sanitize_for_mass_assignment(a: "b"))
end
end