Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-14 03:08:27 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-14 03:08:27 +0300
commitb7d58ff8b17623f64ac7835a590e79d916e758ac (patch)
tree4f75a8f9e0e30cf8c7e944ea2c4461be396c0d5f /spec/serializers/issue_entity_spec.rb
parent0e2fc1701bd0c87cc458cbbb34c618b0e0dc5a14 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/serializers/issue_entity_spec.rb')
-rw-r--r--spec/serializers/issue_entity_spec.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/spec/serializers/issue_entity_spec.rb b/spec/serializers/issue_entity_spec.rb
index 224ed0b402f..a1868b2631b 100644
--- a/spec/serializers/issue_entity_spec.rb
+++ b/spec/serializers/issue_entity_spec.rb
@@ -92,4 +92,36 @@ describe IssueEntity do
end
end
end
+
+ context 'when issuable in active or archived project' do
+ before do
+ project.add_developer(user)
+ end
+
+ context 'when project is active' do
+ it 'returns archived false' do
+ expect(subject[:is_project_archived]).to eq(false)
+ end
+
+ it 'returns nil for archived project doc' do
+ response = described_class.new(resource, request: request).as_json
+
+ expect(response[:archived_project_docs_path]).to be nil
+ end
+ end
+
+ context 'when project is archived' do
+ before do
+ project.update(archived: true)
+ end
+
+ it 'returns archived true' do
+ expect(subject[:is_project_archived]).to eq(true)
+ end
+
+ it 'returns archived project doc' do
+ expect(subject[:archived_project_docs_path]).to eq('/help/user/project/settings/index.md#archiving-a-project')
+ end
+ end
+ end
end