diff options
Diffstat (limited to 'spec/serializers')
-rw-r--r-- | spec/serializers/test_case_entity_spec.rb | 44 |
1 files changed, 8 insertions, 36 deletions
diff --git a/spec/serializers/test_case_entity_spec.rb b/spec/serializers/test_case_entity_spec.rb index e2b0f722f41..cdeefd2fec5 100644 --- a/spec/serializers/test_case_entity_spec.rb +++ b/spec/serializers/test_case_entity_spec.rb @@ -41,47 +41,19 @@ RSpec.describe TestCaseEntity do end end - context 'when feature is enabled' do - before do - stub_feature_flags(junit_pipeline_screenshots_view: true) - end - - context 'when attachment is present' do - let(:test_case) { build(:report_test_case, :failed_with_attachment, job: job) } - - it 'returns the attachment_url' do - expect(subject).to include(:attachment_url) - end - end - - context 'when attachment is not present' do - let(:test_case) { build(:report_test_case, job: job) } + context 'when attachment is present' do + let(:test_case) { build(:report_test_case, :failed_with_attachment, job: job) } - it 'returns a nil attachment_url' do - expect(subject[:attachment_url]).to be_nil - end + it 'returns the attachment_url' do + expect(subject).to include(:attachment_url) end end - context 'when feature is disabled' do - before do - stub_feature_flags(junit_pipeline_screenshots_view: false) - end - - context 'when attachment is present' do - let(:test_case) { build(:report_test_case, :failed_with_attachment, job: job) } - - it 'returns no attachment_url' do - expect(subject).not_to include(:attachment_url) - end - end - - context 'when attachment is not present' do - let(:test_case) { build(:report_test_case, job: job) } + context 'when attachment is not present' do + let(:test_case) { build(:report_test_case, job: job) } - it 'returns no attachment_url' do - expect(subject).not_to include(:attachment_url) - end + it 'returns a nil attachment_url' do + expect(subject[:attachment_url]).to be_nil end end end |