test/controllers/internal_helpers_test.rb in devise-3.4.0 vs test/controllers/internal_helpers_test.rb in devise-3.4.1
- old
+ new
@@ -97,9 +97,15 @@
I18n.stubs(:t).returns('non-blank')
@controller.send :set_flash_message, :notice, :send_instructions
assert_equal 'non-blank', flash[:notice]
end
+ test 'issues non-blank flash.now messages normally' do
+ I18n.stubs(:t).returns('non-blank')
+ @controller.send :set_flash_message, :notice, :send_instructions, { now: true }
+ assert_equal 'non-blank', flash.now[:notice]
+ end
+
test 'uses custom i18n options' do
@controller.stubs(:devise_i18n_options).returns(default: "devise custom options")
@controller.send :set_flash_message, :notice, :invalid_i18n_messagesend_instructions
assert_equal 'devise custom options', flash[:notice]
end