Sha256: 3f603de07800aa51976e0d31bfef90f9089ec96bac628fedb48a1630e3e400d9

Contents?: true

Size: 919 Bytes

Versions: 3

Compression:

Stored size: 919 Bytes

Contents

if ENV['BROWSER']
  require 'spec_helper'

  describe 'flash messages', type: :feature do
    it 'should flash on sucesses, notices, warnings, and errors' do
      visit '/'

      click_link 'Flash'

      click_link 'Flash Notice'
      expect(page).to have_content('A notice message')
      find('.alert').click
      expect(page).to_not have_content('A notice message')

      click_link 'Flash Success'
      expect(page).to have_content('A success message')
      find('.alert').click
      expect(page).to_not have_content('A success message')

      click_link 'Flash Warning'
      expect(page).to have_content('A warning message')
      find('.alert').click
      expect(page).to_not have_content('A warning message')

      click_link 'Flash Error'
      expect(page).to have_content('An error message')
      find('.alert').click
      expect(page).to_not have_content('An error message')

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
volt-0.8.21 spec/integration/flash_spec.rb
volt-0.8.20 spec/integration/flash_spec.rb
volt-0.8.19 spec/integration/flash_spec.rb