Sha256: 75ec0efe98d5fcf1cd13f2b865e012b57c06666e11379b5705972974b8ed2138

Contents?: true

Size: 880 Bytes

Versions: 8

Compression:

Stored size: 880 Bytes

Contents

require 'spec_helper'

feature 'fae_filter_select' do

  before {
    FactoryGirl.create(:release)
  }

  scenario 'collection options defaults to Class.for_fae_index' do
    FactoryGirl.create(:wine, name_en: 'Some Wine')
    FactoryGirl.create(:wine, name_en: 'Another Wine')

    admin_login
    visit admin_releases_path

    expect(page).to have_select('filter[wine]', with_options: ['Another Wine', 'Some Wine'])
  end

  scenario 'collection options are assignable' do
    FactoryGirl.create(:acclaim, score: 'Show Me')
    FactoryGirl.create(:acclaim, score: '')

    admin_login
    visit admin_releases_path

    expect(page).to have_select('filter[acclaims]', with_options: ['Show Me'])
  end

  scenario 'options are assignable' do
    admin_login
    visit admin_releases_path

    expect(page).to have_select('filter[test]', with_options: ['one', 'two'])
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fae-rails-1.5.1 spec/features/form_helpers/fae_filter_select_spec.rb
fae-rails-1.5.0 spec/features/form_helpers/fae_filter_select_spec.rb
fae-rails-1.4.1 spec/features/form_helpers/fae_filter_select_spec.rb
fae-rails-1.4.0 spec/features/form_helpers/fae_filter_select_spec.rb
fae-rails-1.3.1 spec/features/form_helpers/fae_filter_select_spec.rb
fae-rails-1.3.0 spec/features/form_helpers/fae_filter_select_spec.rb
fae-rails-1.2.5 spec/features/form_helpers/fae_filter_select_spec.rb
fae-rails-1.2.4 spec/features/form_helpers/fae_filter_select_spec.rb