Commit cbb212b8 authored by charlie ablett's avatar charlie ablett

Fix failing spec and static analysis error

parent c8a031af
......@@ -7,7 +7,7 @@ module EE
override :js_pipeline_editor_data
def js_pipeline_editor_data(project)
return super unless project.feature_available?(:coverage_fuzzing)
return super unless project.licensed_feature_available?(:api_fuzzing)
super.merge(
"api-fuzzing-configuration-path" => project_security_configuration_api_fuzzing_path(project)
......
......@@ -7,7 +7,7 @@ RSpec.describe EE::Ci::PipelineEditorHelper do
describe '#js_pipeline_editor_data' do
before do
stub_licensed_features(coverage_fuzzing: true)
stub_licensed_features(api_fuzzing: true)
allow(helper)
.to receive(:namespace_project_new_merge_request_path)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
RSpec.describe Projects::Ci::PipelineEditorHelper do
RSpec.describe ::Ci::PipelineEditorHelper do
let_it_be(:project) { create(:project, :public, :repository) }
describe '#js_pipeline_editor_data' do
......@@ -13,11 +13,11 @@ RSpec.describe Projects::Ci::PipelineEditorHelper do
subject { helper.js_pipeline_editor_data(project) }
it {
is_expected.to eq({
is_expected.to match({
"ci-config-path": project.ci_config_path_or_default,
"commit-sha" => project.commit.sha,
"default-branch" => project.default_branch,
"empty-state-illustration-path" => match_asset_path('/assets/illustrations/empty-state/empty-dag-md.svg'),
"empty-state-illustration-path" => match_asset_path("/assets/illustrations/empty-state/empty-dag-md.svg"),
"initial-branch-name": nil,
"lint-help-page-path" => help_page_path('ci/lint', anchor: 'validate-basic-logic-and-syntax'),
"new-merge-request-path" => '/mock/project/-/merge_requests/new',
......
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