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.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/services/create_commit_builds_service_spec.rb b/spec/services/create_commit_builds_service_spec.rb
index 309213bd44c..d4c5e584421 100644
--- a/spec/services/create_commit_builds_service_spec.rb
+++ b/spec/services/create_commit_builds_service_spec.rb
@@ -3,13 +3,13 @@ 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
end
- describe :execute do
+ describe '#execute' do
context 'valid params' do
let(:pipeline) do
service.execute(project, user,
@@ -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