Sha256: ae3a03aa497979e3d5b969c61e6f7616d77fa7071b898d31af20cfddbe123cdd

Contents?: true

Size: 1.03 KB

Versions: 1

Compression:

Stored size: 1.03 KB

Contents

require 'rails_helper'

feature 'Venue Creation' do
  let(:new_venue) { build(:venue) }

  scenario 'User adds a new venue' do
    visit '/'
    click_on 'Venues'
    click_on 'Add a venue'

    fill_in 'Venue Name', with: new_venue.title
    fill_in 'Full Address', with: new_venue.address
    fill_in 'Web Link', with: new_venue.url
    fill_in 'Email', with: new_venue.email
    fill_in 'Telephone', with: new_venue.telephone
    check('venue_wifi')
    fill_in 'Description', with: new_venue.description
    fill_in 'Access notes', with: 'Just knock?'

    click_on 'Create Venue'

    expect(page).to have_content 'Venue was successfully saved.'
    expect(page).to have_content new_venue.title
    expect(page).to have_content new_venue.address
    expect(page).to have_content new_venue.url
    expect(page).to have_content new_venue.email
    expect(page).to have_content new_venue.telephone
    expect(page).to have_content new_venue.description
    expect(page).to have_content 'Just knock?'
    expect(page).to have_content 'Public WiFi'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
calagator-1.1.0 spec/features/add_venue_spec.rb