Moves sponsor email attribute from conference to contact
This commit is contained in:
parent
c0cdf3e6e5
commit
9376fe57e3
10 changed files with 49 additions and 11 deletions
|
|
@ -16,6 +16,7 @@ feature Contact do
|
|||
visit edit_admin_conference_contact_path(conference.short_title)
|
||||
click_link 'Edit'
|
||||
fill_in 'contact_email', with: 'example@example.com'
|
||||
fill_in 'contact_sponsor_email', with: 'sponsor@example.com'
|
||||
fill_in 'contact_social_tag', with: 'example'
|
||||
fill_in 'contact_facebook', with: 'http:\\www.facebook.com'
|
||||
fill_in 'contact_twitter', with: 'http:\\www.twitter.com'
|
||||
|
|
@ -28,6 +29,7 @@ feature Contact do
|
|||
|
||||
contact.reload
|
||||
expect(contact.email).to eq('example@example.com')
|
||||
expect(contact.sponsor_email).to eq('sponsor@example.com')
|
||||
expect(contact.social_tag).to eq('example')
|
||||
expect(contact.facebook).to eq('http:\\www.facebook.com')
|
||||
expect(contact.twitter).to eq('http:\\www.twitter.com')
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@ require 'spec_helper'
|
|||
describe 'conference/show.html.haml' do
|
||||
before(:each) do
|
||||
allow(view).to receive(:date_string).and_return('January 17 - 21 2014')
|
||||
@conference = create(:conference,
|
||||
sponsor_email: 'example@example.com')
|
||||
@conference = create(:conference)
|
||||
|
||||
@conference.splashpage = create(:splashpage,
|
||||
banner_description: 'Lorem Ipsum',
|
||||
|
|
@ -18,21 +17,25 @@ describe 'conference/show.html.haml' do
|
|||
include_social_media: true,
|
||||
include_venue: true,
|
||||
include_lodgings: true)
|
||||
@conference.contact.update(facebook: 'http://www.fbexample.com',
|
||||
|
||||
@conference.contact.update(sponsor_email: 'example@example.com',
|
||||
facebook: 'http://www.fbexample.com',
|
||||
googleplus: 'http://www.google-example.com',
|
||||
instagram: 'http://instagram.com',
|
||||
twitter: 'http://twitter.com')
|
||||
|
||||
@conference.registration_period = create(:registration_period,
|
||||
start_date: Date.today,
|
||||
end_date: Date.tomorrow)
|
||||
|
||||
@conference.call_for_papers = create(:call_for_papers, conference: @conference,
|
||||
include_cfp_in_splash: true)
|
||||
@conference.call_for_papers = create(:call_for_papers, conference: @conference,
|
||||
include_cfp_in_splash: true)
|
||||
|
||||
@conference.sponsorship_levels << create(:sponsorship_level, conference: @conference)
|
||||
@sponsorship_level = @conference.sponsorship_levels.first
|
||||
@sponsorship_level.sponsors << create(:sponsor, sponsorship_level: @sponsorship_level,
|
||||
conference: @conference)
|
||||
|
||||
@conference.venue = create(:venue)
|
||||
@conference.venue.lodgings << create(:lodging, venue: @conference.venue)
|
||||
assign :conference, @conference
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue