Commit 3d645a70 authored by huzaifaiftikhar1's avatar huzaifaiftikhar1

Rename RSpec example description and a few variables

parent ed9f6e3f
......@@ -60,7 +60,7 @@ RSpec.describe ProjectsFinder do
context 'filter by not aimed for deletion' do
let_it_be(:params) { { not_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(ultimate_project, ultimate_project2, premium_project, no_plan_project) }
end
......
......@@ -129,7 +129,7 @@ RSpec.describe Dashboard::ProjectsController, :aggregate_failures do
end
end
it 'does not include projects pending deletion' do
it 'does not include projects aimed for deletion' do
subject
expect(assigns(:projects).count).to eq(2)
......
......@@ -74,7 +74,7 @@ RSpec.describe Explore::ProjectsController do
end
end
context 'projects pending deletion' do
context 'projects aimed for deletion' do
let(:project1) { create(:project, :public, updated_at: 3.days.ago) }
let(:project2) { create(:project, :public, updated_at: 1.day.ago) }
let(:aimed_for_deletion_project) { create(:project, :public, :archived, updated_at: 2.days.ago, marked_for_deletion_at: 2.days.ago) }
......@@ -85,7 +85,7 @@ RSpec.describe Explore::ProjectsController do
create(:trending_project, project: aimed_for_deletion_project)
end
it 'does not list projects pending deletion' do
it 'does not list projects aimed for deletion' do
get :trending
expect(assigns(:projects)).to eq [project2, project1]
......
......@@ -68,7 +68,7 @@ RSpec.describe GroupDescendantsFinder do
expect(finder.execute).to be_empty
end
it 'does not include projects pending deletion' do
it 'does not include projects aimed for deletion' do
_project_aimed_for_deletion = create(:project, :archived, marked_for_deletion_at: 2.days.ago, pending_delete: false)
expect(finder.execute).to be_empty
......
......@@ -3602,16 +3602,16 @@ RSpec.describe User do
let!(:project1) { create(:project) }
let!(:project2) { fork_project(project3) }
let!(:project3) { create(:project) }
let!(:project_pending_deletion) { create(:project, marked_for_deletion_at: 2.days.ago, pending_delete: false) }
let!(:project_aimed_for_deletion) { create(:project, marked_for_deletion_at: 2.days.ago, pending_delete: false) }
let!(:merge_request) { create(:merge_request, source_project: project2, target_project: project3, author: subject) }
let!(:push_event) { create(:push_event, project: project1, author: subject) }
let!(:merge_event) { create(:event, :created, project: project3, target: merge_request, author: subject) }
let!(:merge_event_2) { create(:event, :created, project: project_pending_deletion, target: merge_request, author: subject) }
let!(:merge_event_2) { create(:event, :created, project: project_aimed_for_deletion, target: merge_request, author: subject) }
before do
project1.add_maintainer(subject)
project2.add_maintainer(subject)
project_pending_deletion.add_maintainer(subject)
project_aimed_for_deletion.add_maintainer(subject)
end
it 'includes IDs for projects the user has pushed to' do
......@@ -3626,8 +3626,8 @@ RSpec.describe User do
expect(subject.contributed_projects).not_to include(project2)
end
it "doesn't include projects pending deletion" do
expect(subject.contributed_projects).not_to include(project_pending_deletion)
it "doesn't include projects aimed for deletion" do
expect(subject.contributed_projects).not_to include(project_aimed_for_deletion)
end
end
......
......@@ -531,7 +531,7 @@ RSpec.describe UsersController do
expect(response.body).not_to be_empty
end
it 'does not list projects pending deletion' do
it 'does not list projects aimed for deletion' do
expect(response).to have_gitlab_http_status(:ok)
expect(assigns(:contributed_projects)).to eq([project])
end
......@@ -566,7 +566,7 @@ RSpec.describe UsersController do
describe 'GET #starred' 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_starred_projects_url author.username, format: format
......@@ -585,7 +585,7 @@ RSpec.describe UsersController do
expect(response.body).not_to be_empty
end
it 'does not list projects pending deletion' do
it 'does not list projects aimed for deletion' do
expect(response).to have_gitlab_http_status(:ok)
expect(assigns(:starred_projects)).to eq([project])
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