summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-07-18 08:26:43 +0000
committerRémy Coutable <remy@rymai.me>2016-07-18 08:26:43 +0000
commitf1083ba1f6e4ff0c01d5e08b2a6c0b1f9b5a9b9a (patch)
tree1fff55ef67c0dadb5f77cf138d2c0cfd291b2b21 /spec/services
parent7af92af5fe2a7c5c4be91d0d6daea61fc032d6f4 (diff)
parent9d72d902cf21c786b871eced12609a793596cf29 (diff)
downloadgitlab-ce-f1083ba1f6e4ff0c01d5e08b2a6c0b1f9b5a9b9a.tar.gz
Merge branch 'track-pipeline-user' into 'master'
Track a user who creates a Pipeline ## What does this MR do? This adds additional column to pipelines to track user who is creating pipelines. ## Why was this MR needed? This is to make it possible to show all pipelines created by specific user and to later solve: https://gitlab.com/gitlab-org/gitlab-ce/issues/18054 ## What are the relevant issue numbers? Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/18992 - [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5272
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/create_commit_builds_service_spec.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/services/create_commit_builds_service_spec.rb b/spec/services/create_commit_builds_service_spec.rb
index 4d09bc5fb12..d4c5e584421 100644
--- a/spec/services/create_commit_builds_service_spec.rb
+++ b/spec/services/create_commit_builds_service_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe CreateCommitBuildsService, services: true do
let(:service) { CreateCommitBuildsService.new }
let(:project) { FactoryGirl.create(:empty_project) }
- let(:user) { nil }
+ let(:user) { create(:user) }
before do
stub_ci_pipeline_to_return_yaml_file
@@ -24,6 +24,7 @@ describe CreateCommitBuildsService, services: true do
it { expect(pipeline).to be_valid }
it { expect(pipeline).to be_persisted }
it { expect(pipeline).to eq(project.pipelines.last) }
+ it { expect(pipeline).to have_attributes(user: user) }
it { expect(pipeline.builds.first).to be_kind_of(Ci::Build) }
end