diff options
author | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-03-01 18:07:39 +0900 |
---|---|---|
committer | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-03 02:11:50 +0900 |
commit | d15c120f72a375b6c9634e9aaeaeb159bb0c1998 (patch) | |
tree | e7ca0b347801c994f565a8bee1d8f0aa855511af /spec/finders | |
parent | fd302061f915f535b2dd419d5a76efb76ab534be (diff) | |
download | gitlab-ce-d15c120f72a375b6c9634e9aaeaeb159bb0c1998.tar.gz |
Fix created_at test case because of sorting failure
Diffstat (limited to 'spec/finders')
-rw-r--r-- | spec/finders/pipelines_finder_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/finders/pipelines_finder_spec.rb b/spec/finders/pipelines_finder_spec.rb index 336901d0264..ba2e85f95e3 100644 --- a/spec/finders/pipelines_finder_spec.rb +++ b/spec/finders/pipelines_finder_spec.rb @@ -4,14 +4,14 @@ describe PipelinesFinder do let(:user) { create(:user) } let(:project) { create(:project, :repository) } - let!(:tag_pipeline) { create(:ci_pipeline, project: project, user: user, ref: 'v1.0.0') } - let!(:created_pipeline) { create(:ci_pipeline, project: project, user: user, status: 'created') } - let!(:pending_pipeline) { create(:ci_pipeline, project: project, user: user, status: 'pending') } - let!(:running_pipeline) { create(:ci_pipeline, project: project, user: user, status: 'running') } - let!(:success_pipeline) { create(:ci_pipeline, project: project, user: user, status: 'success') } - let!(:failed_pipeline) { create(:ci_pipeline, project: project, user: user, status: 'failed') } - let!(:canceled_pipeline) { create(:ci_pipeline, project: project, user: user, status: 'canceled') } - let!(:skipped_pipeline) { create(:ci_pipeline, project: project, user: user, status: 'skipped') } + let!(:tag_pipeline) { create(:ci_pipeline, project: project, user: user, created_at: 10.minutes.ago, ref: 'v1.0.0') } + let!(:created_pipeline) { create(:ci_pipeline, project: project, user: user, created_at: 9.minutes.ago, status: 'created') } + let!(:pending_pipeline) { create(:ci_pipeline, project: project, user: user, created_at: 8.minutes.ago, status: 'pending') } + let!(:running_pipeline) { create(:ci_pipeline, project: project, user: user, created_at: 7.minutes.ago, status: 'running') } + let!(:success_pipeline) { create(:ci_pipeline, project: project, user: user, created_at: 6.minutes.ago, status: 'success') } + let!(:failed_pipeline) { create(:ci_pipeline, project: project, user: user, created_at: 5.minutes.ago, status: 'failed') } + let!(:canceled_pipeline) { create(:ci_pipeline, project: project, user: user, created_at: 2.minutes.ago, status: 'canceled') } + let!(:skipped_pipeline) { create(:ci_pipeline, project: project, user: user, created_at: 1.minute.ago, status: 'skipped') } let!(:yaml_errors_pipeline) { create(:ci_pipeline, project: project, user: user, yaml_errors: 'Syntax error') } subject { described_class.new(project, params).execute } |