mirror of
				https://github.com/heartcombo/devise.git
				synced 2022-11-09 12:18:31 -05:00 
			
		
		
		
	Remove assert_nothing_raised deprecated usage.
				
					
				
			This commit is contained in:
		
							parent
							
								
									a20cca6873
								
							
						
					
					
						commit
						656720583f
					
				
					 3 changed files with 5 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -94,7 +94,7 @@ class SessionsControllerTest < Devise::ControllerTestCase
 | 
			
		|||
      User.class_eval { attr_protected :email }
 | 
			
		||||
 | 
			
		||||
      begin
 | 
			
		||||
        assert_nothing_raised ActiveModel::MassAssignmentSecurity::Error do
 | 
			
		||||
        assert_nothing_raised do
 | 
			
		||||
          get :new, user: { email: "allez viens!" }
 | 
			
		||||
        end
 | 
			
		||||
      ensure
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -67,18 +67,18 @@ class DeviseTest < ActiveSupport::TestCase
 | 
			
		|||
  end
 | 
			
		||||
 | 
			
		||||
  test 'add new module using the helper method' do
 | 
			
		||||
    assert_nothing_raised(Exception) { Devise.add_module(:coconut) }
 | 
			
		||||
    Devise.add_module(:coconut)
 | 
			
		||||
    assert_equal 1, Devise::ALL.select { |v| v == :coconut }.size
 | 
			
		||||
    refute Devise::STRATEGIES.include?(:coconut)
 | 
			
		||||
    refute defined?(Devise::Models::Coconut)
 | 
			
		||||
    Devise::ALL.delete(:coconut)
 | 
			
		||||
 | 
			
		||||
    assert_nothing_raised(Exception) { Devise.add_module(:banana, strategy: :fruits) }
 | 
			
		||||
    Devise.add_module(:banana, strategy: :fruits)
 | 
			
		||||
    assert_equal :fruits, Devise::STRATEGIES[:banana]
 | 
			
		||||
    Devise::ALL.delete(:banana)
 | 
			
		||||
    Devise::STRATEGIES.delete(:banana)
 | 
			
		||||
 | 
			
		||||
    assert_nothing_raised(Exception) { Devise.add_module(:kivi, controller: :fruits) }
 | 
			
		||||
    Devise.add_module(:kivi, controller: :fruits)
 | 
			
		||||
    assert_equal :fruits, Devise::CONTROLLERS[:kivi]
 | 
			
		||||
    Devise::ALL.delete(:kivi)
 | 
			
		||||
    Devise::CONTROLLERS.delete(:kivi)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -112,7 +112,7 @@ class CheckFieldsTest < ActiveSupport::TestCase
 | 
			
		|||
      attr_accessor :encrypted_password, :email
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    assert_nothing_raised Devise::Models::MissingAttribute do
 | 
			
		||||
    assert_nothing_raised do
 | 
			
		||||
      Devise::Models.check_fields!(Player)
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue