Apply Rails/PluralizationGrammar rubocop rule
This commit is contained in:
@@ -141,9 +141,6 @@ Rails/Output:
|
||||
Rails/OutputSafety:
|
||||
Enabled: true
|
||||
|
||||
Rails/PluralizationGrammar:
|
||||
Enabled: true
|
||||
|
||||
Rails/Presence:
|
||||
Enabled: true
|
||||
|
||||
|
||||
@@ -129,6 +129,9 @@ Rails/Date:
|
||||
Rails/HttpPositionalArguments:
|
||||
Enabled: true
|
||||
|
||||
Rails/PluralizationGrammar:
|
||||
Enabled: true
|
||||
|
||||
Rails/RelativeDateConstant:
|
||||
Enabled: true
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ describe "Admin budget phases" do
|
||||
scenario "Update phase", :js do
|
||||
visit edit_admin_budget_budget_phase_path(budget, budget.current_phase)
|
||||
|
||||
fill_in "start_date", with: Date.current + 1.days
|
||||
fill_in "start_date", with: Date.current + 1.day
|
||||
fill_in "end_date", with: Date.current + 12.days
|
||||
fill_in_translatable_ckeditor "summary", :en, with: "New summary of the phase."
|
||||
fill_in_translatable_ckeditor "description", :en, with: "New description of the phase."
|
||||
@@ -29,7 +29,7 @@ describe "Admin budget phases" do
|
||||
expect(page).to have_current_path(edit_admin_budget_path(budget))
|
||||
expect(page).to have_content "Changes saved"
|
||||
|
||||
expect(budget.current_phase.starts_at.to_date).to eq((Date.current + 1.days).to_date)
|
||||
expect(budget.current_phase.starts_at.to_date).to eq((Date.current + 1.day).to_date)
|
||||
expect(budget.current_phase.ends_at.to_date).to eq((Date.current + 12.days).to_date)
|
||||
expect(budget.current_phase.summary).to include("New summary of the phase.")
|
||||
expect(budget.current_phase.description).to include("New description of the phase.")
|
||||
|
||||
@@ -97,7 +97,7 @@ describe "Admin collaborative legislation" do
|
||||
fill_in "legislation_process[draft_start_date]",
|
||||
with: (base_date - 3.days).strftime("%d/%m/%Y")
|
||||
fill_in "legislation_process[draft_end_date]",
|
||||
with: (base_date - 1.days).strftime("%d/%m/%Y")
|
||||
with: (base_date - 1.day).strftime("%d/%m/%Y")
|
||||
fill_in "legislation_process[draft_publication_date]",
|
||||
with: (base_date + 3.days).strftime("%d/%m/%Y")
|
||||
fill_in "legislation_process[allegations_start_date]",
|
||||
|
||||
@@ -18,7 +18,7 @@ describe "Legislation" do
|
||||
|
||||
context "process empty" do
|
||||
before do
|
||||
@process = create(:legislation_process, :empty, end_date: Date.current - 1.days)
|
||||
@process = create(:legislation_process, :empty, end_date: Date.current - 1.day)
|
||||
end
|
||||
|
||||
scenario "warning empty" do
|
||||
@@ -29,7 +29,7 @@ describe "Legislation" do
|
||||
|
||||
context "phases empty" do
|
||||
before do
|
||||
@process = create(:legislation_process, end_date: Date.current - 1.days)
|
||||
@process = create(:legislation_process, end_date: Date.current - 1.day)
|
||||
end
|
||||
|
||||
scenario "debates empty" do
|
||||
@@ -56,7 +56,7 @@ describe "Legislation" do
|
||||
|
||||
context "process empty" do
|
||||
before do
|
||||
@process = create(:legislation_process, :empty, end_date: Date.current - 1.days)
|
||||
@process = create(:legislation_process, :empty, end_date: Date.current - 1.day)
|
||||
end
|
||||
|
||||
scenario "warning empty" do
|
||||
@@ -68,7 +68,7 @@ describe "Legislation" do
|
||||
context "only debates exist" do
|
||||
before do
|
||||
user = create(:user, :level_two)
|
||||
@process = create(:legislation_process, end_date: Date.current - 1.days)
|
||||
@process = create(:legislation_process, end_date: Date.current - 1.day)
|
||||
@debate = create(:legislation_question, process: @process, title: "Question 1")
|
||||
create(:debate_comment, user: user, commentable_id: @debate.id, body: "Answer 1")
|
||||
create(:debate_comment, user: user, commentable_id: @debate.id, body: "Answer 2")
|
||||
@@ -123,7 +123,7 @@ describe "Legislation" do
|
||||
|
||||
context "only proposals exist" do
|
||||
before do
|
||||
@process = create(:legislation_process, end_date: Date.current - 1.days)
|
||||
@process = create(:legislation_process, end_date: Date.current - 1.day)
|
||||
create(:legislation_proposal, legislation_process_id: @process.id,
|
||||
title: "Legislation proposal 1", selected: true)
|
||||
create(:legislation_proposal, legislation_process_id: @process.id,
|
||||
@@ -171,7 +171,7 @@ describe "Legislation" do
|
||||
context "only text comments exist" do
|
||||
before do
|
||||
user = create(:user, :level_two)
|
||||
@process = create(:legislation_process, end_date: Date.current - 1.days)
|
||||
@process = create(:legislation_process, end_date: Date.current - 1.day)
|
||||
draft_version_1 = create(:legislation_draft_version, process: @process,
|
||||
title: "Version 1", body: "Body of the first version",
|
||||
status: "published")
|
||||
@@ -231,7 +231,7 @@ describe "Legislation" do
|
||||
describe Legislation::ProcessesController, type: :controller do
|
||||
before do
|
||||
user = create(:user, :level_two)
|
||||
@process = create(:legislation_process, end_date: Date.current - 1.days)
|
||||
@process = create(:legislation_process, end_date: Date.current - 1.day)
|
||||
@debate = create(:legislation_question, process: @process, title: "Question 1")
|
||||
create(:debate_comment, user: user, commentable_id: @debate.id, body: "Answer 1")
|
||||
create(:debate_comment, user: user, commentable_id: @debate.id, body: "Answer 2")
|
||||
|
||||
@@ -240,7 +240,7 @@ describe Debate do
|
||||
it "remains the same for not voted debates" do
|
||||
new = create(:debate, created_at: now)
|
||||
old = create(:debate, created_at: 1.day.ago)
|
||||
older = create(:debate, created_at: 2.month.ago)
|
||||
older = create(:debate, created_at: 2.months.ago)
|
||||
expect(new.hot_score).to be 0
|
||||
expect(old.hot_score).to be 0
|
||||
expect(older.hot_score).to be 0
|
||||
|
||||
@@ -47,7 +47,7 @@ describe Legislation::PeopleProposal do
|
||||
it "remains the same for not voted people_proposals" do
|
||||
new = create(:legislation_people_proposal, created_at: now)
|
||||
old = create(:legislation_people_proposal, created_at: 1.day.ago)
|
||||
older = create(:legislation_people_proposal, created_at: 2.month.ago)
|
||||
older = create(:legislation_people_proposal, created_at: 2.months.ago)
|
||||
expect(new.hot_score).to be 0
|
||||
expect(old.hot_score).to be 0
|
||||
expect(older.hot_score).to be 0
|
||||
|
||||
@@ -47,7 +47,7 @@ describe Legislation::Proposal do
|
||||
it "remains the same for not voted proposals" do
|
||||
new = create(:legislation_proposal, created_at: now)
|
||||
old = create(:legislation_proposal, created_at: 1.day.ago)
|
||||
older = create(:legislation_proposal, created_at: 2.month.ago)
|
||||
older = create(:legislation_proposal, created_at: 2.months.ago)
|
||||
expect(new.hot_score).to be 0
|
||||
expect(old.hot_score).to be 0
|
||||
expect(older.hot_score).to be 0
|
||||
@@ -67,7 +67,7 @@ describe Legislation::Proposal do
|
||||
newer_proposal = create(:legislation_proposal, created_at: now)
|
||||
5.times { newer_proposal.vote_by(voter: create(:user), vote: "yes") }
|
||||
|
||||
older_proposal = create(:legislation_proposal, created_at: 2.day.ago)
|
||||
older_proposal = create(:legislation_proposal, created_at: 2.days.ago)
|
||||
5.times { older_proposal.vote_by(voter: create(:user), vote: "yes") }
|
||||
|
||||
expect(newer_proposal.hot_score).to be > older_proposal.hot_score
|
||||
|
||||
@@ -285,7 +285,7 @@ describe Proposal do
|
||||
it "remains the same for not voted proposals" do
|
||||
new = create(:proposal, created_at: now)
|
||||
old = create(:proposal, created_at: 1.day.ago)
|
||||
older = create(:proposal, created_at: 2.month.ago)
|
||||
older = create(:proposal, created_at: 2.months.ago)
|
||||
expect(new.hot_score).to be 0
|
||||
expect(old.hot_score).to be 0
|
||||
expect(older.hot_score).to be 0
|
||||
|
||||
Reference in New Issue
Block a user