From fb1a0904cb770574b34fc1a01459a5d5c299ee22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Checa?= Date: Wed, 18 Oct 2017 13:17:50 +0200 Subject: [PATCH] Tests improvements --- app/controllers/officing/voters_controller.rb | 2 -- spec/features/officing_spec.rb | 8 +------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/app/controllers/officing/voters_controller.rb b/app/controllers/officing/voters_controller.rb index fdb4a128f..2b7ed329f 100644 --- a/app/controllers/officing/voters_controller.rb +++ b/app/controllers/officing/voters_controller.rb @@ -17,8 +17,6 @@ class Officing::VotersController < Officing::BaseController origin: "booth", officer: current_user.poll_officer) @voter.save! - - render 'create.js' end private diff --git a/spec/features/officing_spec.rb b/spec/features/officing_spec.rb index 5df4d4501..12d322099 100644 --- a/spec/features/officing_spec.rb +++ b/spec/features/officing_spec.rb @@ -107,7 +107,7 @@ feature 'Poll Officing' do expect(page).to_not have_css('#moderation_menu') end - scenario 'Officing dashboard available for multiple sessions' do + scenario 'Officing dashboard available for multiple sessions', :js do poll = create(:poll) booth = create(:poll_booth) booth_assignment = create(:poll_booth_assignment, poll: poll, booth: booth) @@ -137,9 +137,6 @@ feature 'Poll Officing' do page.should have_content("Here you can validate user documents and store voting results") visit new_officing_residence_path - within("#side_menu") do - click_link "Validate document" - end select 'DNI', from: 'residence_document_type' fill_in 'residence_document_number', with: "12345678Z" fill_in 'residence_year_of_birth', with: '1980' @@ -158,9 +155,6 @@ feature 'Poll Officing' do page.should have_content("Here you can validate user documents and store voting results") visit new_officing_residence_path - within("#side_menu") do - click_link "Validate document" - end select 'DNI', from: 'residence_document_type' fill_in 'residence_document_number', with: "12345678Y" fill_in 'residence_year_of_birth', with: '1980'