diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /spec/models/issue_spec.rb | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/models/issue_spec.rb')
-rw-r--r-- | spec/models/issue_spec.rb | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb index bd75d95080f..c77c0a5504a 100644 --- a/spec/models/issue_spec.rb +++ b/spec/models/issue_spec.rb @@ -37,6 +37,7 @@ RSpec.describe Issue do it { is_expected.to have_one(:incident_management_issuable_escalation_status) } it { is_expected.to have_many(:issue_customer_relations_contacts) } it { is_expected.to have_many(:customer_relations_contacts) } + it { is_expected.to have_many(:incident_management_timeline_events) } describe 'versions.most_recent' do it 'returns the most recent version' do @@ -1257,23 +1258,11 @@ RSpec.describe Issue do end describe '.public_only' do - let_it_be(:banned_user) { create(:user, :banned) } - let_it_be(:public_issue) { create(:issue, project: reusable_project) } - let_it_be(:confidential_issue) { create(:issue, project: reusable_project, confidential: true) } - let_it_be(:hidden_issue) { create(:issue, project: reusable_project, author: banned_user) } - it 'only returns public issues' do - expect(described_class.public_only).to eq([public_issue]) - end - - context 'when feature flag is disabled' do - before do - stub_feature_flags(ban_user_feature_flag: false) - end + public_issue = create(:issue, project: reusable_project) + create(:issue, project: reusable_project, confidential: true) - it 'returns public and hidden issues' do - expect(described_class.public_only).to contain_exactly(public_issue, hidden_issue) - end + expect(described_class.public_only).to eq([public_issue]) end end |