diff options
author | Shinya Maeda <shinya@gitlab.com> | 2019-03-01 15:18:08 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2019-03-13 19:26:38 +0700 |
commit | b913169d887bab6b02469cac4d245e2612deb76d (patch) | |
tree | eee24e23e630ea0a026aac0e521380a02910bf2a /spec/serializers | |
parent | 77d22d3721ce3be4a2924b08db638e7be1bb9710 (diff) | |
download | gitlab-ce-b913169d887bab6b02469cac4d245e2612deb76d.tar.gz |
Make all_pipelines method compatible with pipelines for merge requests
Make it sane
Include merge ref head
Fix union
Improve a bit
Add spec
remove
add spec
Add changelog
fix coding offence
Apply suggestion to spec/models/merge_request_spec.rb
ok
ok
Fix
Fix spec
Fix spec
fix
Simplify the things
Memoize
OK
a
Diffstat (limited to 'spec/serializers')
-rw-r--r-- | spec/serializers/pipeline_entity_spec.rb | 2 | ||||
-rw-r--r-- | spec/serializers/pipeline_serializer_spec.rb | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/spec/serializers/pipeline_entity_spec.rb b/spec/serializers/pipeline_entity_spec.rb index 11040862129..d510293ae38 100644 --- a/spec/serializers/pipeline_entity_spec.rb +++ b/spec/serializers/pipeline_entity_spec.rb @@ -4,12 +4,14 @@ describe PipelineEntity do include Gitlab::Routing set(:user) { create(:user) } + set(:project) { create(:project) } let(:request) { double('request') } before do stub_not_protect_default_branch allow(request).to receive(:current_user).and_return(user) + allow(request).to receive(:project).and_return(project) end let(:entity) do diff --git a/spec/serializers/pipeline_serializer_spec.rb b/spec/serializers/pipeline_serializer_spec.rb index a21487938a0..cead75c0895 100644 --- a/spec/serializers/pipeline_serializer_spec.rb +++ b/spec/serializers/pipeline_serializer_spec.rb @@ -5,7 +5,7 @@ describe PipelineSerializer do set(:user) { create(:user) } let(:serializer) do - described_class.new(current_user: user) + described_class.new(current_user: user, project: project) end before do @@ -106,7 +106,7 @@ describe PipelineSerializer do target_project: project, target_branch: 'master', source_project: project, - source_branch: 'feature-1') + source_branch: 'feature') end let!(:merge_request_2) do @@ -115,7 +115,7 @@ describe PipelineSerializer do target_project: project, target_branch: 'master', source_project: project, - source_branch: 'feature-2') + source_branch: '2-mb-file') end before do |