summaryrefslogtreecommitdiff
path: root/spec/models/issue_spec.rb
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2019-02-25 11:00:24 +0000
committerRémy Coutable <remy@rymai.me>2019-02-26 12:24:39 +0100
commita555a227dd7a846e5b8e8c84839120d40f9d1090 (patch)
tree7834ad40f3da966653f7f5ed8a5bf0c118f0b1b1 /spec/models/issue_spec.rb
parentafd290a444d09e84092e5a5d738bcf28ec71f3c6 (diff)
downloadgitlab-ce-a555a227dd7a846e5b8e8c84839120d40f9d1090.tar.gz
Merge branch 'filter-confidential-issues' into 'master'
Ability to filter confidential issues Closes #50747 See merge request gitlab-org/gitlab-ce!24960
Diffstat (limited to 'spec/models/issue_spec.rb')
-rw-r--r--spec/models/issue_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb
index 5d18e085a6f..6101df2e099 100644
--- a/spec/models/issue_spec.rb
+++ b/spec/models/issue_spec.rb
@@ -765,6 +765,15 @@ describe Issue do
end
end
+ describe '.confidential_only' do
+ it 'only returns confidential_only issues' do
+ create(:issue)
+ confidential_issue = create(:issue, confidential: true)
+
+ expect(described_class.confidential_only).to eq([confidential_issue])
+ end
+ end
+
it_behaves_like 'throttled touch' do
subject { create(:issue, updated_at: 1.hour.ago) }
end