test/controllers/internal_helpers_test.rb in devise-2.1.4 vs test/controllers/internal_helpers_test.rb in devise-2.2.0.rc

- old
+ new

@@ -93,9 +93,15 @@ @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 + test 'allows custom i18n options to override resource_name' do + I18n.expects(:t).with("custom_resource_name.confirmed", anything) + @controller.stubs(:devise_i18n_options).returns(:resource_name => "custom_resource_name") + @controller.send :set_flash_message, :notice, :confirmed + end + test 'navigational_formats not returning a wild card' do MyController.send(:public, :navigational_formats) Devise.navigational_formats = [:"*/*", :html] assert_not @controller.navigational_formats.include?(:"*/*") MyController.send(:protected, :navigational_formats)