test/controllers/internal_helpers_test.rb in devise-3.1.2 vs test/controllers/internal_helpers_test.rb in devise-3.2.0
- old
+ new
@@ -53,11 +53,11 @@
test 'resources methods are not controller actions' do
assert @controller.class.action_methods.empty?
end
test 'require no authentication tests current mapping' do
- @mock_warden.expects(:authenticate?).with(:rememberable, :token_authenticatable, :scope => :user).returns(true)
+ @mock_warden.expects(:authenticate?).with(:rememberable, :scope => :user).returns(true)
@mock_warden.expects(:user).with(:user).returns(User.new)
@controller.expects(:redirect_to).with(root_path)
@controller.send :require_no_authentication
end
@@ -69,10 +69,10 @@
@controller.expects(:redirect_to).with(root_path)
@controller.send :require_no_authentication
end
test 'require no authentication sets a flash message' do
- @mock_warden.expects(:authenticate?).with(:rememberable, :token_authenticatable, :scope => :user).returns(true)
+ @mock_warden.expects(:authenticate?).with(:rememberable, :scope => :user).returns(true)
@mock_warden.expects(:user).with(:user).returns(User.new)
@controller.expects(:redirect_to).with(root_path)
@controller.send :require_no_authentication
assert flash[:alert] == I18n.t("devise.failure.already_authenticated")
end