diff options
Diffstat (limited to 'spec/serializers/pipeline_entity_spec.rb')
-rw-r--r-- | spec/serializers/pipeline_entity_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/serializers/pipeline_entity_spec.rb b/spec/serializers/pipeline_entity_spec.rb index 1d992e8a483..dba7fd91747 100644 --- a/spec/serializers/pipeline_entity_spec.rb +++ b/spec/serializers/pipeline_entity_spec.rb @@ -143,6 +143,11 @@ describe PipelineEntity do expect(subject[:flags][:detached_merge_request_pipeline]).to be_truthy end + it 'does not expose source sha and target sha' do + expect(subject[:source_sha]).to be_nil + expect(subject[:target_sha]).to be_nil + end + context 'when user is a developer' do before do project.add_developer(user) @@ -189,6 +194,11 @@ describe PipelineEntity do it 'makes atached flag true' do expect(subject[:flags][:merge_request_pipeline]).to be_truthy end + + it 'exposes source sha and target sha' do + expect(subject[:source_sha]).to be_present + expect(subject[:target_sha]).to be_present + end end end end |