diff options
author | Igor <idrozdov@gitlab.com> | 2019-08-28 21:09:22 +0000 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2019-08-28 21:09:22 +0000 |
commit | 8db6c4c6e770be30e3c49b842c501d66e427c4d9 (patch) | |
tree | c02bb87adac063768ff0b531d42e11b0c9f688de /spec/serializers | |
parent | 1ca42a247923a8887a3684c08d5c7012a9177997 (diff) | |
download | gitlab-ce-8db6c4c6e770be30e3c49b842c501d66e427c4d9.tar.gz |
Reduce the number of SQL requests on MR-show
- Extract MR fields for notes into a separate serializer
- Check if pipelines are empty via count
Diffstat (limited to 'spec/serializers')
-rw-r--r-- | spec/serializers/merge_request_serializer_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/serializers/merge_request_serializer_spec.rb b/spec/serializers/merge_request_serializer_spec.rb index 276e0f6ff3d..d1483c3c41e 100644 --- a/spec/serializers/merge_request_serializer_spec.rb +++ b/spec/serializers/merge_request_serializer_spec.rb @@ -41,6 +41,14 @@ describe MergeRequestSerializer do end end + context 'noteable merge request serialization' do + let(:serializer) { 'noteable' } + + it 'matches noteable merge request json schema' do + expect(json_entity).to match_schema('entities/merge_request_noteable', strict: true) + end + end + context 'no serializer' do let(:serializer) { nil } |