Remove trait :current for poll on factories

When we create a poll with "create(:poll)" it is already a current poll.
This commit is contained in:
taitus
2022-08-30 13:23:48 +02:00
committed by Javi Martín
parent 5a0fde4048
commit d0359d584e
11 changed files with 25 additions and 30 deletions

View File

@@ -32,7 +32,7 @@ describe "Admin booths", :admin do
end
scenario "Available" do
booth_for_current_poll = create(:poll_booth, polls: [create(:poll, :current)])
booth_for_current_poll = create(:poll_booth, polls: [create(:poll)])
booth_for_expired_poll = create(:poll_booth, polls: [create(:poll, :expired)])
visit admin_root_path
@@ -74,7 +74,7 @@ describe "Admin booths", :admin do
end
scenario "Edit" do
poll = create(:poll, :current)
poll = create(:poll)
booth = create(:poll_booth, polls: [poll])
visit admin_booths_path
@@ -99,7 +99,7 @@ describe "Admin booths", :admin do
end
scenario "Back link go back to available list when manage shifts" do
poll = create(:poll, :current)
poll = create(:poll)
booth = create(:poll_booth, polls: [poll])
visit available_admin_booths_path

View File

@@ -27,7 +27,7 @@ describe "Admin shifts", :admin do
scenario "Create Vote Collection Shift and Recount & Scrutiny Shift on same date" do
create(:poll)
poll = create(:poll, :current)
poll = create(:poll)
booth = create(:poll_booth, polls: [poll, create(:poll, :expired)])
officer = create(:poll_officer)
vote_collection_dates = (Date.current..poll.ends_at.to_date).to_a.map { |date| I18n.l(date, format: :long) }
@@ -89,7 +89,7 @@ describe "Admin shifts", :admin do
end
scenario "Vote Collection Shift and Recount & Scrutiny Shift don't include already assigned dates to officer" do
poll = create(:poll, :current)
poll = create(:poll)
booth = create(:poll_booth, polls: [poll])
officer = create(:poll_officer)
@@ -137,7 +137,7 @@ describe "Admin shifts", :admin do
end
scenario "Error on create" do
poll = create(:poll, :current)
poll = create(:poll)
booth = create(:poll_booth, polls: [poll])
officer = create(:poll_officer)
@@ -158,7 +158,7 @@ describe "Admin shifts", :admin do
end
scenario "Destroy" do
poll = create(:poll, :current)
poll = create(:poll)
booth = create(:poll_booth, polls: [poll])
officer = create(:poll_officer)