Sha256: 62b10b1cfa2f76a224d66f5dc8164c9404bae3d73344fee82f355a384bfd6862
Contents?: true
Size: 822 Bytes
Versions: 13
Compression:
Stored size: 822 Bytes
Contents
require 'rails_helper' RSpec.describe ActiveAdmin::ViewHelpers::FlashHelper do describe '.flash_messages' do let(:view) { action_view } it "should not include 'timedout' flash messages by default" do view.request.flash[:alert] = "Alert" view.request.flash[:timedout] = true expect(view.flash_messages).to include 'alert' expect(view.flash_messages).to_not include 'timedout' end it "should not return flash messages included in flash_keys_to_except" do expect(view.active_admin_application).to receive(:flash_keys_to_except).and_return ["hideme"] view.request.flash[:alert] = "Alert" view.request.flash[:hideme] = "Do not show" expect(view.flash_messages).to include 'alert' expect(view.flash_messages).to_not include 'hideme' end end end
Version data entries
13 entries across 13 versions & 3 rubygems