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

Add case with disabled features

parent 8e6e38fc
...@@ -28,26 +28,36 @@ describe Ci::PipelinePresenter do ...@@ -28,26 +28,36 @@ describe Ci::PipelinePresenter do
describe '#expose_security_dashboard?' do describe '#expose_security_dashboard?' do
subject { presenter.expose_security_dashboard? } subject { presenter.expose_security_dashboard? }
before do context 'when features are available' do
stub_licensed_features(dependency_scanning: true, license_management: true) before do
end stub_licensed_features(dependency_scanning: true, license_management: true)
end
context 'when there is an artifact of a right type' do context 'when there is an artifact of a right type' do
let!(:build) { create(:ee_ci_build, :dependency_scanning, pipeline: pipeline) } let!(:build) { create(:ee_ci_build, :dependency_scanning, pipeline: pipeline) }
it { is_expected.to be_truthy } it { is_expected.to be_truthy }
end end
context 'when there is an artifact of a wrong type' do context 'when there is an artifact of a wrong type' do
let!(:build) { create(:ee_ci_build, :license_scanning, pipeline: pipeline) } let!(:build) { create(:ee_ci_build, :license_scanning, pipeline: pipeline) }
it { is_expected.to be_falsey } it { is_expected.to be_falsey }
end
context 'when there is no found artifact' do
let!(:build) { create(:ee_ci_build, pipeline: pipeline) }
it { is_expected.to be_falsey }
end
end end
context 'when there is no found artifact' do context 'when features are disabled' do
let!(:build) { create(:ee_ci_build, pipeline: pipeline) } 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 } it { is_expected.to be_falsey }
end
end 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