Sha256: f9c52aac43f8bfc3007b778897e4e4dc9cc606b3987bf5d38147ce0b92ffb83e

Contents?: true

Size: 383 Bytes

Versions: 3

Compression:

Stored size: 383 Bytes

Contents

require 'spec_helper'

describe "api spec", type: :feature, js: true do
  it 'should invoke the API for each flash message' do
    visit '/test/api'
    expect(page).to have_content 'Page loaded'
    expect(evaluate_script('window.flashMessages')).to eq [
      {'type' => 'notice', 'message' => 'Inline Notice'},
      {'type' => 'error', 'message' => 'Ajax Error'}
    ]
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
unobtrusive_flash-3.3.1 spec/integration/api_spec.rb
unobtrusive_flash-3.3.0 spec/integration/api_spec.rb
unobtrusive_flash-3.2.0 spec/integration/api_spec.rb