adds notice with html after spending proposal creation
This commit is contained in:
@@ -40,6 +40,32 @@ feature 'Spending proposals' do
|
||||
expect(page).to have_content('All city')
|
||||
end
|
||||
|
||||
scenario 'Create notice' do
|
||||
login_as(author)
|
||||
|
||||
visit new_spending_proposal_path
|
||||
fill_in 'spending_proposal_title', with: 'Build a skyscraper'
|
||||
fill_in 'spending_proposal_description', with: 'I want to live in a high tower over the clouds'
|
||||
fill_in 'spending_proposal_external_url', with: 'http://http://skyscraperpage.com/'
|
||||
fill_in 'spending_proposal_association_name', with: 'People of the neighbourhood'
|
||||
fill_in 'spending_proposal_captcha', with: correct_captcha_text
|
||||
select 'All city', from: 'spending_proposal_geozone_id'
|
||||
check 'spending_proposal_terms_of_service'
|
||||
|
||||
click_button 'Create'
|
||||
|
||||
expect(page).to have_content 'Spending proposal created successfully'
|
||||
expect(page).to have_content 'You can access it from My activity'
|
||||
|
||||
within "#notice" do
|
||||
click_link 'My activity'
|
||||
end
|
||||
|
||||
expect(current_url).to eq(user_url(author, filter: :spending_proposals))
|
||||
expect(page).to have_content "1 Spending proposal"
|
||||
expect(page).to have_content "Build a skyscraper"
|
||||
end
|
||||
|
||||
scenario 'Captcha is required for proposal creation' do
|
||||
login_as(author)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user