Test helper without licensed feature

parent cbb212b8
...@@ -7,8 +7,6 @@ RSpec.describe EE::Ci::PipelineEditorHelper do ...@@ -7,8 +7,6 @@ RSpec.describe EE::Ci::PipelineEditorHelper do
describe '#js_pipeline_editor_data' do describe '#js_pipeline_editor_data' do
before do before do
stub_licensed_features(api_fuzzing: true)
allow(helper) allow(helper)
.to receive(:namespace_project_new_merge_request_path) .to receive(:namespace_project_new_merge_request_path)
.and_return('/mock/project/-/merge_requests/new') .and_return('/mock/project/-/merge_requests/new')
...@@ -20,8 +18,20 @@ RSpec.describe EE::Ci::PipelineEditorHelper do ...@@ -20,8 +18,20 @@ RSpec.describe EE::Ci::PipelineEditorHelper do
subject(:pipeline_editor_data) { helper.js_pipeline_editor_data(project) } subject(:pipeline_editor_data) { helper.js_pipeline_editor_data(project) }
context 'with licensed feature' do
before do
stub_licensed_features(api_fuzzing: true)
end
it 'returns ee specific values' do it 'returns ee specific values' do
expect(pipeline_editor_data.keys).to include('api-fuzzing-configuration-path') expect(pipeline_editor_data.keys).to include('api-fuzzing-configuration-path')
end end
end end
context 'without licensed feature' do
it 'returns ee specific values' do
expect(pipeline_editor_data.keys).not_to include('api-fuzzing-configuration-path')
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