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