Commit 9a4b4cee authored by Tetiana Chupryna's avatar Tetiana Chupryna

Add case with disabled features

parent 8e6e38fc
...@@ -28,6 +28,7 @@ describe Ci::PipelinePresenter do ...@@ -28,6 +28,7 @@ describe Ci::PipelinePresenter do
describe '#expose_security_dashboard?' do describe '#expose_security_dashboard?' do
subject { presenter.expose_security_dashboard? } subject { presenter.expose_security_dashboard? }
context 'when features are available' do
before do before do
stub_licensed_features(dependency_scanning: true, license_management: true) stub_licensed_features(dependency_scanning: true, license_management: true)
end end
...@@ -50,4 +51,13 @@ describe Ci::PipelinePresenter do ...@@ -50,4 +51,13 @@ describe Ci::PipelinePresenter do
it { is_expected.to be_falsey } it { is_expected.to be_falsey }
end end
end end
context 'when features are disabled' do
context 'when there is an artifact of a right type' do
let!(:build) { create(:ee_ci_build, :dependency_scanning, pipeline: pipeline) }
it { is_expected.to be_falsey }
end
end
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment