diff options
| author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-24 12:43:48 +0200 |
|---|---|---|
| committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-31 10:56:28 +0200 |
| commit | ec614728f676a684819087f9d08c153054639166 (patch) | |
| tree | 3109df7f69afa4535cc303fbb9619f19a3c6afca /spec | |
| parent | 85949ac151e77086d586c6e14007349fcb9680ce (diff) | |
| download | gitlab-ce-ec614728f676a684819087f9d08c153054639166.tar.gz | |
Fix the conflict resolution in spec/models/ci/runner_spec.rb
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/models/ci/runner_spec.rb | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/spec/models/ci/runner_spec.rb b/spec/models/ci/runner_spec.rb index 2bd6e16a6cd..08578c27e37 100644 --- a/spec/models/ci/runner_spec.rb +++ b/spec/models/ci/runner_spec.rb @@ -612,32 +612,16 @@ describe Ci::Runner do end describe '.assignable_for' do - let(:runner) { create(:ci_runner, :project, projects: [project]) } let(:project) { create(:project) } + let(:group) { create(:group) } let(:another_project) { create(:project) } + let!(:unlocked_project_runner) { create(:ci_runner, :project, projects: [project]) } + let!(:locked_project_runner) { create(:ci_runner, :project, locked: true, projects: [project]) } + let!(:group_runner) { create(:ci_runner, :group, groups: [group]) } + let!(:instance_runner) { create(:ci_runner, :instance) } - context 'with shared runners' do - let(:runner) { create(:ci_runner, :instance) } - - context 'does not give owned runner' do - subject { described_class.assignable_for(project) } - - it { is_expected.to be_empty } - end - - context 'does not give shared runner' do - subject { described_class.assignable_for(another_project) } - - it { is_expected.to be_empty } - end - end - - context 'with unlocked runner' do - context 'does not give owned runner' do - subject { described_class.assignable_for(project) } - - it { is_expected.to be_empty } - end + context 'with already assigned project' do + subject { described_class.assignable_for(project) } it { is_expected.to be_empty } end |
