summaryrefslogtreecommitdiff
path: root/spec/services/create_commit_builds_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/create_commit_builds_service_spec.rb')
-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