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

Fix spec

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