Moves sponsor email attribute from conference to contact

This commit is contained in:
Chrisbr 2014-09-30 11:59:02 +02:00 committed by chrisbr
parent c0cdf3e6e5
commit 9376fe57e3
10 changed files with 49 additions and 11 deletions

View file

@ -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