Move Conference contact details to Contact
This commit is contained in:
parent
eb3e6898d2
commit
5aa0d58c57
18 changed files with 67 additions and 58 deletions
|
|
@ -4,9 +4,7 @@ FactoryGirl.define do
|
|||
factory :conference do
|
||||
title 'The dog and pony show'
|
||||
sequence(:short_title) { |n| "dps#{n}14" }
|
||||
social_tag 'dps14'
|
||||
timezone 'Amsterdam'
|
||||
contact_email 'admin@example.com'
|
||||
start_date { Date.today }
|
||||
end_date { 6.days.from_now }
|
||||
registration_start_date { 3.days.from_now }
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ feature Conference do
|
|||
visit new_admin_conference_path
|
||||
fill_in 'conference_title', with: 'Example Con'
|
||||
fill_in 'conference_short_title', with: 'ExCon'
|
||||
fill_in 'conference_social_tag', with: 'ExCon'
|
||||
|
||||
select('(GMT+01:00) Berlin', from: 'conference[timezone]')
|
||||
|
||||
|
|
@ -42,7 +41,6 @@ feature Conference do
|
|||
visit edit_admin_conference_path(conference.short_title)
|
||||
fill_in 'conference_title', with: 'New Con'
|
||||
fill_in 'conference_short_title', with: 'NewCon'
|
||||
fill_in 'conference_social_tag', with: 'NewCon'
|
||||
|
||||
click_button 'Update Conference'
|
||||
expect(flash).
|
||||
|
|
@ -51,7 +49,6 @@ feature Conference do
|
|||
conference.reload
|
||||
expect(conference.title).to eq('New Con')
|
||||
expect(conference.short_title).to eq('NewCon')
|
||||
expect(conference.social_tag).to eq('NewCon')
|
||||
expect(Conference.count).to eq(expected_count)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1457,10 +1457,6 @@ describe Conference do
|
|||
should validate_presence_of(:short_title)
|
||||
end
|
||||
|
||||
it 'is not valid without a social tag' do
|
||||
should validate_presence_of(:social_tag)
|
||||
end
|
||||
|
||||
it 'is not valid without a start date' do
|
||||
should validate_presence_of(:start_date)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -7,6 +7,5 @@ describe 'admin/conference/edit' do
|
|||
assign :conference, @conference
|
||||
render template: 'admin/conference/edit.html.haml'
|
||||
expect(rendered).to include('OpenSUSE')
|
||||
expect(rendered).to include("#{@conference.contact_email}")
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -8,17 +8,20 @@ describe 'conference/show.html.haml' do
|
|||
description: 'Lorem Ipsum',
|
||||
sponsor_description: 'Lorem Ipsum Dolor',
|
||||
sponsor_email: 'example@example.com',
|
||||
facebook_url: 'http://www.fbexample.com',
|
||||
google_url: 'http://www.google-example.com',
|
||||
instagram_url: "http://instagram.com",
|
||||
twitter_url: "http://twitter.com",
|
||||
include_registrations_in_splash: true,
|
||||
include_program_in_splash: true,
|
||||
include_sponsors_in_splash: true,
|
||||
include_social_media_in_splash: true,
|
||||
include_tracks_in_splash: true,
|
||||
include_tickets_in_splash: true,
|
||||
include_banner_in_splash: true)
|
||||
@conference.contact.update(facebook: 'http://www.fbexample.com',
|
||||
googleplus: 'http://www.google-example.com',
|
||||
instagram: 'http://instagram.com',
|
||||
twitter: 'http://twitter.com',
|
||||
public: true
|
||||
)
|
||||
@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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue