summaryrefslogtreecommitdiff
path: root/spec/serializers
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2017-06-01 21:34:44 +0200
committerZ.J. van de Weg <git@zjvandeweg.nl>2017-06-02 13:14:09 +0200
commitb24651826f249cd1fcbd87d097c42488d0472611 (patch)
treeba9ce7b7c945dfe05e129cf635d7f5bf6fe1068f /spec/serializers
parent6c87239653e78ca5aaff9bb19424895c621bf7a1 (diff)
downloadgitlab-ce-b24651826f249cd1fcbd87d097c42488d0472611.tar.gz
Add user to BuildDetailsEntity
Also add minor changed needed to pass review
Diffstat (limited to 'spec/serializers')
-rw-r--r--spec/serializers/build_details_entity_spec.rb3
-rw-r--r--spec/serializers/build_entity_spec.rb5
2 files changed, 5 insertions, 3 deletions
diff --git a/spec/serializers/build_details_entity_spec.rb b/spec/serializers/build_details_entity_spec.rb
index 8533cd77d1d..c372df7dd90 100644
--- a/spec/serializers/build_details_entity_spec.rb
+++ b/spec/serializers/build_details_entity_spec.rb
@@ -30,7 +30,8 @@ describe BuildDetailsEntity do
it 'contains the needed key value pairs' do
expect(subject).to include(:coverage, :erased_at, :duration)
expect(subject).to include(:artifacts, :runner, :pipeline)
- expect(subject).to include(:raw_path, :merge_request, :new_issue_path)
+ expect(subject).to include(:raw_path, :merge_request)
+ expect(subject[:build_failed_options]).to include(:new_issue_path)
end
it 'exposes details of the merge request' do
diff --git a/spec/serializers/build_entity_spec.rb b/spec/serializers/build_entity_spec.rb
index 6d5e1046e86..e48d558f33f 100644
--- a/spec/serializers/build_entity_spec.rb
+++ b/spec/serializers/build_entity_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe BuildEntity do
let(:user) { create(:user) }
- let(:build) { create(:ci_build) }
+ let(:build) { create(:ci_build, :failed) }
let(:project) { build.project }
let(:request) { double('request') }
@@ -17,7 +17,8 @@ describe BuildEntity do
subject { entity.as_json }
it 'contains paths to build page and retry action' do
- expect(subject).to include(:build_path, :retry_path)
+ expect(subject).to include(:build_path, :build_failed_options)
+ expect(subject.dig(:build_failed_options, :retry_path)).not_to be_nil
end
it 'does not contain sensitive information' do