diff options
author | Heinrich Lee Yu <heinrich@gitlab.com> | 2018-11-27 16:47:10 +0800 |
---|---|---|
committer | Heinrich Lee Yu <hleeyu@gmail.com> | 2018-12-19 17:58:53 +0800 |
commit | 6c79e9307e116d6115f6d76ac796176952fb83cd (patch) | |
tree | 85a2981cf3451e9c3918e894b488d3b9fec6337d /spec/serializers | |
parent | 1f7c072e08913dda0534bc5534a50f389567433f (diff) | |
download | gitlab-ce-6c79e9307e116d6115f6d76ac796176952fb83cd.tar.gz |
Refactor issuable sidebar to have extras option
Diffstat (limited to 'spec/serializers')
-rw-r--r-- | spec/serializers/issue_serializer_spec.rb | 2 | ||||
-rw-r--r-- | spec/serializers/merge_request_basic_serializer_spec.rb | 16 | ||||
-rw-r--r-- | spec/serializers/merge_request_serializer_spec.rb | 4 |
3 files changed, 3 insertions, 19 deletions
diff --git a/spec/serializers/issue_serializer_spec.rb b/spec/serializers/issue_serializer_spec.rb index e8c46c0cdee..b9946515f26 100644 --- a/spec/serializers/issue_serializer_spec.rb +++ b/spec/serializers/issue_serializer_spec.rb @@ -18,7 +18,7 @@ describe IssueSerializer do end context 'sidebar issue serialization' do - let(:serializer) { 'sidebar' } + let(:serializer) { 'sidebar_extras' } it 'matches sidebar issue json schema' do expect(json_entity).to match_schema('entities/issue_sidebar') diff --git a/spec/serializers/merge_request_basic_serializer_spec.rb b/spec/serializers/merge_request_basic_serializer_spec.rb deleted file mode 100644 index 1fad8e6bc5d..00000000000 --- a/spec/serializers/merge_request_basic_serializer_spec.rb +++ /dev/null @@ -1,16 +0,0 @@ -require 'spec_helper' - -describe MergeRequestBasicSerializer do - let(:resource) { create(:merge_request) } - let(:user) { create(:user) } - - let(:json_entity) do - described_class.new(current_user: user) - .represent(resource, serializer: 'basic') - .with_indifferent_access - end - - it 'matches basic merge request json' do - expect(json_entity).to match_schema('entities/merge_request_basic') - end -end diff --git a/spec/serializers/merge_request_serializer_spec.rb b/spec/serializers/merge_request_serializer_spec.rb index b259cb92962..aa055854add 100644 --- a/spec/serializers/merge_request_serializer_spec.rb +++ b/spec/serializers/merge_request_serializer_spec.rb @@ -18,10 +18,10 @@ describe MergeRequestSerializer do end context 'sidebar merge request serialization' do - let(:serializer) { 'sidebar' } + let(:serializer) { 'sidebar_extras' } it 'matches basic merge request json schema' do - expect(json_entity).to match_schema('entities/merge_request_basic') + expect(json_entity).to match_schema('entities/merge_request_sidebar') end end |