Refactoring of proposal workflow. Fixes #215

This commit is contained in:
Stella Rouzi 2015-04-16 18:34:41 +03:00
parent 333c5e39bf
commit e6bb168c5e
35 changed files with 491 additions and 192 deletions

View file

@ -75,7 +75,7 @@ feature Commercial do
sign_out
end
scenario 'adds a invalid commercial to an event', feature: true, js: true do
scenario 'adds a valid commercial to an event', feature: true, js: true do
visit edit_conference_proposal_path(conference.short_title, event.id)
click_link 'Commercials'
@ -89,7 +89,7 @@ feature Commercial do
expect(event.commercials.count).to eq(@expected_count)
end
scenario 'adds a valid commercial to an event', feature: true, js: true do
scenario 'adds an invalid commercial to an event', feature: true, js: true do
visit edit_conference_proposal_path(conference.short_title, event.id)
click_link 'Commercials'
click_link 'Add Commercial'
@ -97,7 +97,6 @@ feature Commercial do
select('SlideShare', from: 'commercial_commercial_type')
click_button 'Create Commercial'
expect(flash).to eq("An error prohibited this Commercial from being saved: Commercial can't be blank.")
expect(event.commercials.count).to eq(@expected_count - 1)
end
@ -125,7 +124,6 @@ feature Commercial do
select('SlideShare', from: 'commercial_commercial_type')
fill_in 'commercial_commercial_id', with: ''
click_button 'Update Commercial'
expect(flash).to eq("An error prohibited this Commercial from being saved: Commercial can't be blank.")
expect(event.commercials.count).to eq(@expected_count)
end