Skip to content

Commit 9561880

Browse files
Remove no longer relevant test for mass assignment sanitization
This is no longer in Rails since v5, it's been extracted to `protected_attributes`, and we're dropping support to older versions of Rails in main. https://github.com/rails/protected_attributes
1 parent 47e8716 commit 9561880

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

test/controllers/sessions_controller_test.rb

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -87,22 +87,4 @@ class SessionsControllerTest < Devise::ControllerTestCase
8787
assert flash[:notice].blank?, "flash[:notice] should be blank, not #{flash[:notice].inspect}"
8888
assert_equal 204, @response.status
8989
end
90-
91-
if defined?(ActiveRecord) && ActiveRecord::Base.respond_to?(:mass_assignment_sanitizer)
92-
test "#new doesn't raise mass-assignment exception even if sign-in key is attr_protected" do
93-
request.env["devise.mapping"] = Devise.mappings[:user]
94-
95-
ActiveRecord::Base.mass_assignment_sanitizer = :strict
96-
User.class_eval { attr_protected :email }
97-
98-
begin
99-
assert_nothing_raised do
100-
get :new, user: { email: "allez viens!" }
101-
end
102-
ensure
103-
ActiveRecord::Base.mass_assignment_sanitizer = :logger
104-
User.class_eval { attr_accessible :email }
105-
end
106-
end
107-
end
10890
end

0 commit comments

Comments
 (0)