Added tests

This commit is contained in:
María Checa
2017-10-23 12:25:51 +02:00
parent f8e5f791b3
commit 6b5c29f23e

View File

@@ -60,6 +60,10 @@ feature 'Admin polls' do
fill_in 'poll_ends_at', with: end_date.strftime("%d/%m/%Y")
fill_in 'poll_summary', with: "Upcoming poll's summary. This poll..."
fill_in 'poll_description', with: "Upcomming poll's description. This poll..."
expect(page).to_not have_css("#poll_results_enabled")
expect(page).to_not have_css("#poll_stats_enabled")
click_button "Create poll"
expect(page).to have_content "Poll created successfully"
@@ -79,6 +83,9 @@ feature 'Admin polls' do
expect(page).to have_css("img[alt='#{poll.image.title}']")
expect(page).to have_css("#poll_results_enabled")
expect(page).to have_css("#poll_stats_enabled")
fill_in "poll_name", with: "Next Poll"
fill_in 'poll_ends_at', with: end_date.strftime("%d/%m/%Y")