Apply Rspec/LetSetup rubocop rule
This commit is contained in:
@@ -186,11 +186,11 @@ describe "Notifications" do
|
||||
let!(:user2) { create(:user) }
|
||||
let!(:user3) { create(:user) }
|
||||
let!(:proposal_notification) { create(:proposal_notification) }
|
||||
let!(:notification1) { create(:notification, notifiable: proposal_notification, user: user1) }
|
||||
let!(:notification2) { create(:notification, notifiable: proposal_notification, user: user2) }
|
||||
let!(:notification3) { create(:notification, notifiable: proposal_notification, user: user3) }
|
||||
|
||||
before do
|
||||
create(:notification, notifiable: proposal_notification, user: user1)
|
||||
create(:notification, notifiable: proposal_notification, user: user2)
|
||||
create(:notification, notifiable: proposal_notification, user: user3)
|
||||
reset_mailer
|
||||
Delayed::Worker.delay_jobs = true
|
||||
end
|
||||
|
||||
@@ -63,12 +63,13 @@ describe "Poll Votation Type" do
|
||||
let(:poll_current) { create(:poll, :current) }
|
||||
let(:question) { create(:poll_question_multiple, poll: poll_current) }
|
||||
let!(:answer1) { create(:poll_question_answer, question: question, title: "answer_1") }
|
||||
let!(:answer2) { create(:poll_question_answer, question: question, title: "answer_2") }
|
||||
let!(:answer3) { create(:poll_question_answer, question: question, title: "answer_3") }
|
||||
let!(:answer4) { create(:poll_question_answer, question: question, title: "answer_4") }
|
||||
let!(:answer5) { create(:poll_question_answer, question: question, title: "answer_5") }
|
||||
|
||||
before do
|
||||
create(:poll_question_answer, question: question, title: "answer_2")
|
||||
create(:poll_question_answer, question: question, title: "answer_3")
|
||||
create(:poll_question_answer, question: question, title: "answer_4")
|
||||
create(:poll_question_answer, question: question, title: "answer_5")
|
||||
|
||||
login_as(user)
|
||||
end
|
||||
|
||||
@@ -152,13 +153,14 @@ describe "Poll Votation Type" do
|
||||
let(:user) { create(:user, :verified) }
|
||||
let(:poll_current) { create(:poll, :current) }
|
||||
let(:question) { create(:poll_question_prioritized, poll: poll_current) }
|
||||
let!(:answer1) { create(:poll_question_answer, question: question, title: "answer_1") }
|
||||
let!(:answer2) { create(:poll_question_answer, question: question, title: "answer_2") }
|
||||
let!(:answer3) { create(:poll_question_answer, question: question, title: "answer_3") }
|
||||
let!(:answer4) { create(:poll_question_answer, question: question, title: "answer_4") }
|
||||
let!(:answer5) { create(:poll_question_answer, question: question, title: "answer_5") }
|
||||
|
||||
before do
|
||||
create(:poll_question_answer, question: question, title: "answer_1")
|
||||
create(:poll_question_answer, question: question, title: "answer_2")
|
||||
create(:poll_question_answer, question: question, title: "answer_3")
|
||||
create(:poll_question_answer, question: question, title: "answer_4")
|
||||
create(:poll_question_answer, question: question, title: "answer_5")
|
||||
|
||||
login_as(user)
|
||||
end
|
||||
|
||||
@@ -218,12 +220,13 @@ describe "Poll Votation Type" do
|
||||
let(:poll_current) { create(:poll, :current) }
|
||||
let(:question) { create(:poll_question_positive_open, poll: poll_current) }
|
||||
let!(:answer1) { create(:poll_question_answer, question: question, title: "answer_1") }
|
||||
let!(:answer2) { create(:poll_question_answer, question: question, title: "answer_2") }
|
||||
let!(:answer3) { create(:poll_question_answer, question: question, title: "answer_3") }
|
||||
let!(:answer4) { create(:poll_question_answer, question: question, title: "answer_4") }
|
||||
let!(:answer5) { create(:poll_question_answer, question: question, title: "answer_5") }
|
||||
|
||||
before do
|
||||
create(:poll_question_answer, question: question, title: "answer_2")
|
||||
create(:poll_question_answer, question: question, title: "answer_3")
|
||||
create(:poll_question_answer, question: question, title: "answer_4")
|
||||
create(:poll_question_answer, question: question, title: "answer_5")
|
||||
|
||||
login_as(user)
|
||||
end
|
||||
|
||||
@@ -324,13 +327,14 @@ describe "Poll Votation Type" do
|
||||
let(:user) { create(:user, :verified) }
|
||||
let(:poll_current) { create(:poll, :current) }
|
||||
let(:question) { create(:poll_question_answer_set_open, poll: poll_current) }
|
||||
let!(:answer1) { create(:poll_question_answer, question: question, title: "answer_1") }
|
||||
let!(:answer2) { create(:poll_question_answer, question: question, title: "answer_2") }
|
||||
let!(:answer3) { create(:poll_question_answer, question: question, title: "answer_3") }
|
||||
let!(:answer4) { create(:poll_question_answer, question: question, title: "answer_4") }
|
||||
let!(:answer5) { create(:poll_question_answer, question: question, title: "answer_5") }
|
||||
|
||||
before do
|
||||
create(:poll_question_answer, question: question, title: "answer_1")
|
||||
create(:poll_question_answer, question: question, title: "answer_2")
|
||||
create(:poll_question_answer, question: question, title: "answer_3")
|
||||
create(:poll_question_answer, question: question, title: "answer_4")
|
||||
create(:poll_question_answer, question: question, title: "answer_5")
|
||||
|
||||
login_as(user)
|
||||
end
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ describe "Voter" do
|
||||
end
|
||||
|
||||
context "The person has decided not to vote at this time" do
|
||||
let!(:user) { create(:user, :in_census) }
|
||||
before { create(:user, :in_census) }
|
||||
|
||||
scenario "Show not to vote at this time button" do
|
||||
login_through_form_as_officer(officer.user)
|
||||
|
||||
Reference in New Issue
Block a user