Commit 49cbe576 authored by Dylan Griffith's avatar Dylan Griffith

Remove Runner#belonging_to_any_project since this is no longer needed

parent d39b3d4b
......@@ -72,7 +72,6 @@ module Projects
.ci_authorized_runners
.assignable_for(project)
.ordered
.belonging_to_any_project
.page(params[:page]).per(20)
@shared_runners = ::Ci::Runner.shared.active
......
......@@ -32,8 +32,6 @@ module Ci
joins(:runner_projects).where(ci_runner_projects: { project_id: project_id })
}
scope :belonging_to_any_project, -> { joins(:runner_projects) }
scope :belonging_to_parent_group_of_project, -> (project_id) {
project_groups = ::Group.joins(:projects).where(projects: { id: project_id })
hierarchy_groups = Gitlab::GroupHierarchy.new(project_groups).base_and_ancestors
......
......@@ -137,21 +137,6 @@ describe Ci::Runner do
end
end
describe '.belonging_to_any_project' do
it 'returns the specific project runner' do
# project
project_project = create(:project)
project_runner = create(:ci_runner, :specific, projects: [project_project])
# group
group = create(:group)
create(:project, group: group)
create(:ci_runner, :specific, groups: [group])
expect(described_class.belonging_to_any_project).to eq [project_runner]
end
end
describe '.belonging_to_parent_group_of_project' do
let(:project) { create(:project, group: group) }
let(:group) { create(:group) }
......
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