Commit 5049097d authored by Pedro Pombeiro's avatar Pedro Pombeiro Committed by Adam Hegyi

Fix Ci::RunnersFinder.ALLOWED_SORTS

parent cd7b81bd
...@@ -4,8 +4,8 @@ module Ci ...@@ -4,8 +4,8 @@ module Ci
class RunnersFinder < UnionFinder class RunnersFinder < UnionFinder
include Gitlab::Allowable include Gitlab::Allowable
ALLOWED_SORTS = %w[contacted_asc contacted_desc created_at_asc created_at_desc].freeze ALLOWED_SORTS = %w[contacted_asc contacted_desc created_at_asc created_at_desc created_date].freeze
DEFAULT_SORT = 'created_date' DEFAULT_SORT = 'created_at_desc'
def initialize(current_user:, group: nil, params:) def initialize(current_user:, group: nil, params:)
@params = params @params = params
......
...@@ -278,8 +278,8 @@ RSpec.describe Ci::RunnersFinder do ...@@ -278,8 +278,8 @@ RSpec.describe Ci::RunnersFinder do
subject { described_class.new(current_user: user, group: group, params: params).sort_key } subject { described_class.new(current_user: user, group: group, params: params).sort_key }
context 'no params' do context 'no params' do
it 'returns created_date' do it 'returns created_at_desc' do
expect(subject).to eq('created_date') expect(subject).to eq('created_at_desc')
end end
end end
......
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