Another round of splash design

* Add map to splash
* Reverse venue<->conference relation
* Split venue address into fields
* Don't go through venue for lodgings anymore
This commit is contained in:
Henne Vogelsang 2014-11-20 14:57:03 +01:00
parent 30e8ab856c
commit cb227a0afc
55 changed files with 717 additions and 548 deletions

View file

@ -8,7 +8,6 @@ feature Lodging do
scenario 'Add a lodging', feature: true, js: true do
path = "#{Rails.root}/app/assets/images/rails.png"
conference.venue = create(:venue)
sign_in organizer
visit admin_conference_lodgings_path(
conference_id: conference.short_title)
@ -16,7 +15,6 @@ feature Lodging do
click_link 'Add Lodging'
fill_in 'lodging_name', with: 'New lodging'
fill_in 'lodging_description', with: 'This is the lodging description'
fill_in 'lodging_website_link', with: 'http:\\www.google.com'
attach_file 'Photo', path
@ -25,17 +23,13 @@ feature Lodging do
# Validations
expect(flash).to eq('Lodging successfully created.')
expect(page.has_content?('New lodging')).to be true
expect(page.has_content?('This is the lodging description')).to be true
expect(page.has_content?('Go to Website')).to be true
expect(Lodging.count).to eq(1)
end
scenario 'Update a lodging', feature: true, js: true do
path = "#{Rails.root}/app/assets/images/rails.png"
venue = create(:venue)
lodging = create(:lodging, venue: conference.venue)
conference.venue = venue
lodging = create(:lodging, conference: conference)
sign_in organizer
visit admin_conference_lodgings_path(
@ -48,7 +42,6 @@ feature Lodging do
click_link 'Edit'
fill_in 'lodging_name', with: 'New lodging'
fill_in 'lodging_description', with: 'This is the lodging description'
fill_in 'lodging_website_link', with: 'http:\\www.google.com'
attach_file 'Photo', path
@ -57,19 +50,15 @@ feature Lodging do
# Validations
expect(flash).to eq('Lodging successfully updated.')
expect(page.has_content?('New lodging')).to be true
expect(page.has_content?('This is the lodging description')).to be true
expect(page.has_content?('Go to Website')).to be true
lodging.reload
expect(lodging.name).to eq('New lodging')
expect(lodging.description).to eq('This is the lodging description')
expect(lodging.description).to eq('Lorem Ipsum Dolor')
expect(lodging.website_link).to eq('http:\\www.google.com')
expect(Lodging.count).to eq(1)
end
scenario 'Delete a lodging', feature: true, js: true do
venue = create(:venue)
create(:lodging, venue: conference.venue)
conference.venue = venue
conference.lodgings << create(:lodging)
sign_in organizer
visit admin_conference_lodgings_path(