Use describe on feature tests
The `type: :feature` is automatically detected by RSpec because these tests are inside the `spec/features` folder. Using `feature` re-adds a `type: :feature` to these files, which will result in a conflict when we upgrade to Rails 5.1's system tests. Because of this change, we also need to change `background` to `before` or else these tests will fail.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
require "rails_helper"
|
||||
|
||||
feature "Poll budget ballot sheets" do
|
||||
describe "Poll budget ballot sheets" do
|
||||
let(:budget) { create(:budget) }
|
||||
let(:poll) { create(:poll, budget: budget, ends_at: 1.day.ago) }
|
||||
let(:booth) { create(:poll_booth) }
|
||||
@@ -8,7 +8,7 @@ feature "Poll budget ballot sheets" do
|
||||
|
||||
context "Officing recounts and results view" do
|
||||
|
||||
background do
|
||||
before do
|
||||
create(:poll_booth_assignment, poll: poll, booth: booth)
|
||||
create(:poll_shift, :recount_scrutiny_task, officer: poll_officer, booth: booth,
|
||||
date: Date.current)
|
||||
@@ -80,7 +80,7 @@ feature "Poll budget ballot sheets" do
|
||||
|
||||
context "Index" do
|
||||
|
||||
background do
|
||||
before do
|
||||
create(:poll_booth_assignment, poll: poll, booth: booth)
|
||||
create(:poll_shift, :recount_scrutiny_task, officer: poll_officer, booth: booth,
|
||||
date: Date.current)
|
||||
@@ -102,7 +102,7 @@ feature "Poll budget ballot sheets" do
|
||||
|
||||
context "New" do
|
||||
|
||||
background do
|
||||
before do
|
||||
create(:poll_booth_assignment, poll: poll, booth: booth)
|
||||
create(:poll_shift, :recount_scrutiny_task, officer: poll_officer, booth: booth,
|
||||
date: Date.current)
|
||||
@@ -150,7 +150,7 @@ feature "Poll budget ballot sheets" do
|
||||
|
||||
context "Show" do
|
||||
|
||||
background do
|
||||
before do
|
||||
create(:poll_booth_assignment, poll: poll, booth: booth)
|
||||
create(:poll_shift, :recount_scrutiny_task, officer: poll_officer, booth: booth,
|
||||
date: Date.current)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
require "rails_helper"
|
||||
|
||||
feature "Admin Budgets" do
|
||||
describe "Admin Budgets" do
|
||||
|
||||
background do
|
||||
before do
|
||||
admin = create(:administrator).user
|
||||
login_as(admin)
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require "rails_helper"
|
||||
|
||||
feature "Budget Poll Officing" do
|
||||
describe "Budget Poll Officing" do
|
||||
|
||||
scenario "Show sidebar menus if officer has shifts assigned" do
|
||||
poll = create(:poll)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require "rails_helper"
|
||||
|
||||
feature "Polls" do
|
||||
describe "Polls" do
|
||||
|
||||
context "Public index" do
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require "rails_helper"
|
||||
|
||||
feature "Poll Questions" do
|
||||
describe "Poll Questions" do
|
||||
|
||||
before do
|
||||
admin = create(:administrator).user
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require "rails_helper"
|
||||
|
||||
feature "BudgetPolls", :with_frozen_time do
|
||||
describe "BudgetPolls", :with_frozen_time do
|
||||
let(:budget) { create(:budget, :balloting) }
|
||||
let(:group) { create(:budget_group, budget: budget) }
|
||||
let(:heading) { create(:budget_heading, group: group) }
|
||||
@@ -11,7 +11,7 @@ feature "BudgetPolls", :with_frozen_time do
|
||||
let(:admin) { create(:administrator) }
|
||||
let!(:user) { create(:user, :in_census) }
|
||||
|
||||
background do
|
||||
before do
|
||||
create(:poll_shift, officer: officer, booth: booth, date: Date.current, task: :vote_collection)
|
||||
booth_assignment = create(:poll_booth_assignment, poll: poll, booth: booth)
|
||||
create(:poll_officer_assignment, officer: officer, booth_assignment: booth_assignment, date: Date.current)
|
||||
|
||||
Reference in New Issue
Block a user