Commit 1925bfd2 authored by Shinya Maeda's avatar Shinya Maeda

Fix spec

parent bbe967ab
......@@ -60,7 +60,7 @@ class Projects::RunnersController < Projects::ApplicationController
def runner_params
params.require(:runner).permit(Ci::Runner::FORM_EDITABLE).tap do |params|
params['access_level'] = params['access_level']&.to_i
params['access_level'] = params['access_level'].to_i if params['access_level']
end
end
end
......@@ -276,6 +276,7 @@ CommitStatus:
- coverage_regex
- auto_canceled_by_id
- retried
- protected
Ci::Variable:
- id
- project_id
......
......@@ -464,8 +464,8 @@ describe Ci::Runner do
end
it 'a protected runner exists' do
expect(Ci::Runner.count).to eq(1)
expect(Ci::Runner.last.protected_?).to eq(true)
expect(described_class.count).to eq(1)
expect(described_class.last.protected_?).to eq(true)
end
end
......@@ -475,8 +475,8 @@ describe Ci::Runner do
end
it 'an unprotected runner exists' do
expect(Ci::Runner.count).to eq(1)
expect(Ci::Runner.last.unprotected?).to eq(true)
expect(described_class.count).to eq(1)
expect(described_class.last.unprotected?).to eq(true)
end
end
end
......
......@@ -22,7 +22,7 @@ describe Ci::RetryBuildService do
%i[type lock_version target_url base_tags
commit_id deployments erased_by_id last_deployment project_id
runner_id tag_taggings taggings tags trigger_request_id
user_id auto_canceled_by_id retried].freeze
user_id auto_canceled_by_id retried protected].freeze
shared_examples 'build duplication' do
let(:stage) do
......
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