Sha256: aa378bea0e009ccdf18e0e3c713c0fcae960b6efa5bbbae0671a67c538d39fd7

Contents?: true

Size: 942 Bytes

Versions: 9

Compression:

Stored size: 942 Bytes

Contents

require 'rails_helper'

feature 'Admin lock events search' do
  background do
    create :venue, title: 'Empire State Building'
    create :event, title: 'Ruby Newbies', start_time: Time.zone.now
    create :event, title: 'Ruby Privateers', start_time: Time.zone.now, locked: true

    page.driver.basic_authorize Calagator.admin_username, Calagator.admin_password

    visit '/admin/events'
  end

  scenario 'only shows query matches' do
    fill_in 'admin_search_field', with: 'Privateers'

    click_on 'Search'

    expect(page).to_not have_content('Ruby Newbies')
    expect(page).to have_content('Ruby Privateers')
  end

  scenario 'only shows query matches after lock/unlock' do
    fill_in 'admin_search_field', with: 'Privateers'

    click_on 'Search'
    click_on 'Unlock'

    expect(page).to have_button('Lock')
    expect(page).to have_content('Ruby Privateers')
    expect(page).to_not have_content('Ruby Newbies')
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
grokus-1.0.0.9 spec/features/admin_search_event_spec.rb
grokus-1.0.0.8 spec/features/admin_search_event_spec.rb
grokus-1.0.0.7 spec/features/admin_search_event_spec.rb
grokus-1.0.0.6 spec/features/admin_search_event_spec.rb
grokus-1.0.0.5 spec/features/admin_search_event_spec.rb
grokus-1.0.0.3 spec/features/admin_search_event_spec.rb
grokus-1.0.0.2 spec/features/admin_search_event_spec.rb
grokus-1.0.0.1 spec/features/admin_search_event_spec.rb
calagator-1.0.0.rc3 spec/features/admin_search_event_spec.rb