summaryrefslogtreecommitdiff
path: root/spec/finders/admin
diff options
context:
space:
mode:
authorAlexis Reigel <alexis.reigel.ext@siemens.com>2018-07-12 18:15:03 +0200
committerAlexis Reigel <alexis.reigel.ext@siemens.com>2018-08-29 15:02:54 +0200
commit34bdb74740d0b983bfc299362b25945c9e50681c (patch)
tree290ee4a1d7d5938849acf916149ab909a51f1cfc /spec/finders/admin
parent89b30999c294d2e344d095e635d72aa16d108a2b (diff)
downloadgitlab-ce-34bdb74740d0b983bfc299362b25945c9e50681c.tar.gz
add sort dropdown to admin runners page
Diffstat (limited to 'spec/finders/admin')
-rw-r--r--spec/finders/admin/runners_finder_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/finders/admin/runners_finder_spec.rb b/spec/finders/admin/runners_finder_spec.rb
index 757e4d52e90..30267ace5bc 100644
--- a/spec/finders/admin/runners_finder_spec.rb
+++ b/spec/finders/admin/runners_finder_spec.rb
@@ -29,10 +29,10 @@ describe Admin::RunnersFinder do
context 'sort' do
context 'without sort param' do
- it 'sorts by id' do
- runner1 = create :ci_runner
- runner2 = create :ci_runner
- runner3 = create :ci_runner
+ it 'sorts by created_at' do
+ runner1 = create :ci_runner, created_at: '2018-07-12 07:00'
+ runner2 = create :ci_runner, created_at: '2018-07-12 08:00'
+ runner3 = create :ci_runner, created_at: '2018-07-12 09:00'
expect(described_class.new(params: {}).execute).to eq [runner3, runner2, runner1]
end
@@ -52,8 +52,8 @@ describe Admin::RunnersFinder do
context 'paginate' do
it 'returns the runners for the specified page' do
stub_const('Admin::RunnersFinder::NUMBER_OF_RUNNERS_PER_PAGE', 1)
- runner1 = create :ci_runner
- runner2 = create :ci_runner
+ runner1 = create :ci_runner, created_at: '2018-07-12 07:00'
+ runner2 = create :ci_runner, created_at: '2018-07-12 08:00'
expect(described_class.new(params: { page: 1 }).execute).to eq [runner2]
expect(described_class.new(params: { page: 2 }).execute).to eq [runner1]