diff options
author | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-18 11:45:08 +0300 |
---|---|---|
committer | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-30 17:55:09 +0300 |
commit | 20a07d26ff4be9c82271297e516df912109b05aa (patch) | |
tree | 2447be0ae059fc48964c62dfff80ce88a9681615 /spec/requests/api | |
parent | 17b9128b305aefc29fddae3b51d13c61ae7dfef9 (diff) |
Include owner for pipeline_schedules. Improve N+1 spec. Use PipelineBasic for small payload.
Diffstat (limited to 'spec/requests/api')
-rw-r--r-- | spec/requests/api/pipeline_schedules_spec.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/requests/api/pipeline_schedules_spec.rb b/spec/requests/api/pipeline_schedules_spec.rb index 1b44043907b..74de2f0ba4a 100644 --- a/spec/requests/api/pipeline_schedules_spec.rb +++ b/spec/requests/api/pipeline_schedules_spec.rb @@ -30,8 +30,12 @@ describe API::PipelineSchedules do get api("/projects/#{project.id}/pipeline_schedules", developer) end.count - create_list(:ci_pipeline_schedule, 10, project: project, owner: developer) + create_list(:ci_pipeline_schedule, 10, project: project) .each do |pipeline_schedule| + create(:user).tap do |user| + project.add_developer(user) + pipeline_schedule.update_attributes(owner: user) + end pipeline_schedule.pipelines << build(:ci_pipeline, project: project) end |