mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-10 08:08:00 -05:00
Remove mass-assignment role-based tests, no longer supported in Rails 4
Mass-assignment security roles are removed in Rails 4 so there's no need to test :as => :role behavior.
This commit is contained in:
@@ -111,13 +111,6 @@ class DatabaseAuthenticatableTest < ActiveSupport::TestCase
|
||||
assert user.reload.valid_password?('pass4321')
|
||||
end
|
||||
|
||||
test 'should update password with valid current password and :as option' do
|
||||
user = create_user
|
||||
assert user.update_with_password(:current_password => '12345678',
|
||||
:password => 'pass4321', :password_confirmation => 'pass4321', :as => :admin)
|
||||
assert user.reload.valid_password?('pass4321')
|
||||
end
|
||||
|
||||
test 'should add an error to current password when it is invalid' do
|
||||
user = create_user
|
||||
assert_not user.update_with_password(:current_password => 'other',
|
||||
@@ -170,12 +163,6 @@ class DatabaseAuthenticatableTest < ActiveSupport::TestCase
|
||||
assert_equal 'new@example.com', user.email
|
||||
end
|
||||
|
||||
test 'should update the user without password with :as option' do
|
||||
user = create_user
|
||||
user.update_without_password(:email => 'new@example.com', :as => :admin)
|
||||
assert_equal 'new@example.com', user.email
|
||||
end
|
||||
|
||||
test 'should not update password without password' do
|
||||
user = create_user
|
||||
user.update_without_password(:password => 'pass4321', :password_confirmation => 'pass4321')
|
||||
|
||||
Reference in New Issue
Block a user