Commit ed9f6e3f authored by huzaifaiftikhar1's avatar huzaifaiftikhar1

Rename variables in RSpecs for consistency

parent 327ac75e
......@@ -52,7 +52,7 @@ RSpec.describe ProjectsFinder do
context 'filter by aimed for deletion' do
let_it_be(:params) { { aimed_for_deletion: true } }
let_it_be(:aimed_for_deletion_project) { create(:project, :public, marked_for_deletion_at: 2.days.ago, pending_delete: false) }
let_it_be(:deleted_project) { create(:project, :public, marked_for_deletion_at: 1.month.ago, pending_delete: true) }
let_it_be(:pending_deletion_project) { create(:project, :public, marked_for_deletion_at: 1.month.ago, pending_delete: true) }
it { is_expected.to contain_exactly(aimed_for_deletion_project) }
end
......
......@@ -97,7 +97,7 @@ RSpec.describe Dashboard::ProjectsController, :aggregate_failures do
subject { get :starred, format: :json }
let(:projects) { create_list(:project, 2, creator: user) }
let(:pending_deletion_project) { create_list(:project, 2, :archived, creator: user, marked_for_deletion_at: 3.days.ago) }
let(:aimed_for_deletion_project) { create_list(:project, 2, :archived, creator: user, marked_for_deletion_at: 3.days.ago) }
before do
projects.each do |project|
......@@ -105,7 +105,7 @@ RSpec.describe Dashboard::ProjectsController, :aggregate_failures do
create(:users_star_project, project_id: project.id, user_id: user.id)
end
pending_deletion_project.each do |project|
aimed_for_deletion_project.each do |project|
project.add_developer(user)
create(:users_star_project, project_id: project.id, user_id: user.id)
end
......
......@@ -77,12 +77,12 @@ RSpec.describe Explore::ProjectsController do
context 'projects pending deletion' do
let(:project1) { create(:project, :public, updated_at: 3.days.ago) }
let(:project2) { create(:project, :public, updated_at: 1.day.ago) }
let(:pending_deletion_project) { create(:project, :public, :archived, updated_at: 2.days.ago, marked_for_deletion_at: 2.days.ago) }
let(:aimed_for_deletion_project) { create(:project, :public, :archived, updated_at: 2.days.ago, marked_for_deletion_at: 2.days.ago) }
before do
create(:trending_project, project: project1)
create(:trending_project, project: project2)
create(:trending_project, project: pending_deletion_project)
create(:trending_project, project: aimed_for_deletion_project)
end
it 'does not list projects pending deletion' do
......
......@@ -506,7 +506,7 @@ RSpec.describe UsersController do
describe 'GET #contributed' do
let(:project) { create(:project, :public) }
let(:pending_deletion_project) { create(:project, :public, :archived, marked_for_deletion_at: 3.days.ago) }
let(:aimed_for_deletion_project) { create(:project, :public, :archived, marked_for_deletion_at: 3.days.ago) }
subject do
get user_contributed_projects_url author.username, format: format
......@@ -517,10 +517,10 @@ RSpec.describe UsersController do
project.add_developer(public_user)
project.add_developer(private_user)
pending_deletion_project.add_developer(public_user)
pending_deletion_project.add_developer(private_user)
aimed_for_deletion_project.add_developer(public_user)
aimed_for_deletion_project.add_developer(private_user)
create(:push_event, project: project, author: author)
create(:push_event, project: pending_deletion_project, author: author)
create(:push_event, project: aimed_for_deletion_project, author: author)
subject
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment