summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-12-21 14:03:15 +0100
committerBob Van Landuyt <bob@vanlanduyt.co>2017-12-21 15:35:54 +0100
commitc27c65f97ac6c02a73661ebd66e728b6fd4a6039 (patch)
treee5dc96bc62a0e30070c87da75dde88ebc2c69f81 /spec/controllers
parent3ee5fd156e3465a1e1c04b2b321c62b577496ee8 (diff)
downloadgitlab-ce-c27c65f97ac6c02a73661ebd66e728b6fd4a6039.tar.gz
Fall back to the `MergeRequestWidgetEntity`
When no serializer was passed.
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/projects/merge_requests_controller_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/controllers/projects/merge_requests_controller_spec.rb b/spec/controllers/projects/merge_requests_controller_spec.rb
index 58116e6e0fe..45c424af8c4 100644
--- a/spec/controllers/projects/merge_requests_controller_spec.rb
+++ b/spec/controllers/projects/merge_requests_controller_spec.rb
@@ -98,6 +98,14 @@ describe Projects::MergeRequestsController do
expect(response).to match_response_schema('entities/merge_request_widget')
end
end
+
+ context 'when no serialiser was passed' do
+ it 'renders widget MR entity as json' do
+ go(serializer: nil, format: :json)
+
+ expect(response).to match_response_schema('entities/merge_request_widget')
+ end
+ end
end
describe "as diff" do