Remove obsolete "let" blocks in tests setup

These blocks are no longer used:

* `allowed_phase_list` isn't used since commit 04605d5d5
* `level_two_user` isn't used since commit 26d14cbd0
* `heading` in `budgets/stats_spec` was added in c2457e36a but never
  used
* `translatable` was added in 44d137a4c but it's overwritten in all the
  contexts.
* `annotation` isn't used since commit 79d00e7b9
* `admin` in `tags/budget_investments_spec` isn't used since 8a2e15980
* `budget` in `welcome_spec` was added in 87be6f302 but never used
This commit is contained in:
Javi Martín
2025-03-24 14:31:39 +01:00
parent 5ba6e7b692
commit 71742f72b0
6 changed files with 2 additions and 11 deletions

View File

@@ -130,8 +130,6 @@ describe "Admin edit translatable records", :admin do
end
context "Add an invalid translation" do
let(:translatable) { create(:budget_investment) }
context "Input field" do
let(:translatable) { create(:budget, main_link_url: "https://consuldemocracy.org") }

View File

@@ -1,9 +1,7 @@
require "rails_helper"
describe "Budgets" do
let(:budget) { create(:budget) }
let(:level_two_user) { create(:user, :level_two) }
let(:allowed_phase_list) { ["balloting", "reviewing_ballots", "finished"] }
let(:budget) { create(:budget) }
context "Load" do
before { budget.update(slug: "budget_slug") }

View File

@@ -1,8 +1,7 @@
require "rails_helper"
describe "Stats" do
let(:budget) { create(:budget, :finished) }
let(:heading) { create(:budget_heading, budget: budget, price: 1000) }
let(:budget) { create(:budget, :finished) }
context "Load" do
before { budget.update(slug: "budget_slug") }

View File

@@ -2,7 +2,6 @@ require "rails_helper"
describe "Commenting legislation annotations" do
let(:user) { create(:user) }
let(:annotation) { create(:legislation_annotation, author: user) }
describe "Merged comment threads" do
let!(:draft_version) { create(:legislation_draft_version, :published) }

View File

@@ -10,7 +10,6 @@ describe "Tags" do
end
let!(:tag_medio_ambiente) { create(:tag, :category, name: "Medio Ambiente") }
let!(:tag_economia) { create(:tag, :category, name: "Economía") }
let(:admin) { create(:administrator).user }
scenario "Index" do
earth = create(:budget_investment, heading: heading, tag_list: tag_medio_ambiente.name)

View File

@@ -1,8 +1,6 @@
require "rails_helper"
describe "Welcome screen" do
let(:budget) { create(:budget) }
it_behaves_like "remotely_translatable", :proposal, "root_path", {}
it_behaves_like "remotely_translatable", :debate, "root_path", {}
it_behaves_like "remotely_translatable", :legislation_process, "root_path", {}