Merge branch 'master' into aperez-admin-question-videos

This commit is contained in:
Raimond Garcia
2017-10-06 01:12:22 +02:00
committed by GitHub
42 changed files with 460 additions and 277 deletions

View File

@@ -70,14 +70,18 @@ feature 'Admin polls' do
scenario "Edit" do
poll = create(:poll)
create(:image, imageable: poll)
visit admin_poll_path(poll)
click_link "Edit"
end_date = 1.year.from_now
expect(page).to have_css("img[alt='#{poll.image.title}']")
fill_in "poll_name", with: "Next Poll"
fill_in 'poll_ends_at', with: end_date.strftime("%d/%m/%Y")
click_button "Update poll"
expect(page).to have_content "Poll updated successfully"

View File

@@ -0,0 +1,14 @@
require 'rails_helper'
feature 'Images' do
background do
admin = create(:administrator)
login_as(admin.user)
end
pending "Index"
pending "Create"
pending "Destroy"
end

View File

@@ -31,6 +31,8 @@ feature 'Admin shifts' do
end
scenario "Create Vote Collection Shift and Recount & Scrutiny Shift on same date", :js do
create(:poll)
create(:poll, :incoming)
poll = create(:poll, :current)
booth = create(:poll_booth)
assignment = create(:poll_booth_assignment, poll: poll, booth: booth)