Use archived trait for project in specs instead model column
This commit is contained in:
parent
125abfd4b2
commit
a92c0f9c11
4 changed files with 4 additions and 4 deletions
|
@ -10,7 +10,7 @@ describe "Admin::Projects", feature: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "GET /admin/projects" do
|
describe "GET /admin/projects" do
|
||||||
let!(:archived_project) { create :project, :public, archived: true }
|
let!(:archived_project) { create :project, :public, :archived }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
visit admin_projects_path
|
visit admin_projects_path
|
||||||
|
|
|
@ -7,7 +7,7 @@ feature 'Group merge requests page', feature: true do
|
||||||
include_examples 'project features apply to issuables', MergeRequest
|
include_examples 'project features apply to issuables', MergeRequest
|
||||||
|
|
||||||
context 'archived issuable' do
|
context 'archived issuable' do
|
||||||
let(:project_archived) { create(:project, group: group, merge_requests_access_level: ProjectFeature::ENABLED, archived: true) }
|
let(:project_archived) { create(:project, :archived, group: group, merge_requests_access_level: ProjectFeature::ENABLED) }
|
||||||
let(:issuable_archived) { create(:merge_request, source_project: project_archived, target_project: project_archived, title: 'issuable of an archived project') }
|
let(:issuable_archived) { create(:merge_request, source_project: project_archived, target_project: project_archived, title: 'issuable of an archived project') }
|
||||||
let(:access_level) { ProjectFeature::ENABLED }
|
let(:access_level) { ProjectFeature::ENABLED }
|
||||||
let(:user) { user_in_group }
|
let(:user) { user_in_group }
|
||||||
|
|
|
@ -6,7 +6,7 @@ describe MergeRequestsFinder do
|
||||||
|
|
||||||
let(:project1) { create(:project) }
|
let(:project1) { create(:project) }
|
||||||
let(:project2) { create(:project, forked_from_project: project1) }
|
let(:project2) { create(:project, forked_from_project: project1) }
|
||||||
let(:project3) { create(:project, forked_from_project: project1, archived: true) }
|
let(:project3) { create(:project, :archived, forked_from_project: project1) }
|
||||||
|
|
||||||
let!(:merge_request1) { create(:merge_request, :simple, author: user, source_project: project2, target_project: project1) }
|
let!(:merge_request1) { create(:merge_request, :simple, author: user, source_project: project2, target_project: project1) }
|
||||||
let!(:merge_request2) { create(:merge_request, :simple, author: user, source_project: project2, target_project: project1, state: 'closed') }
|
let!(:merge_request2) { create(:merge_request, :simple, author: user, source_project: project2, target_project: project1, state: 'closed') }
|
||||||
|
|
|
@ -36,7 +36,7 @@ describe MoveToProjectFinder do
|
||||||
|
|
||||||
it 'does not return archived projects' do
|
it 'does not return archived projects' do
|
||||||
reporter_project.team << [user, :reporter]
|
reporter_project.team << [user, :reporter]
|
||||||
reporter_project.update_attributes(archived: true)
|
reporter_project.archive!
|
||||||
other_reporter_project = create(:empty_project)
|
other_reporter_project = create(:empty_project)
|
||||||
other_reporter_project.team << [user, :reporter]
|
other_reporter_project.team << [user, :reporter]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue