From 22cd3f927336378959ca6d7e82666c3a34ee483e Mon Sep 17 00:00:00 2001 From: Simon Detheridge Date: Mon, 10 Dec 2018 13:12:34 +0000 Subject: [PATCH] Merge pull request #1237 from sharelatex/spd-open-in-overleaf-zip_uri Add zip_uri and publisher_slug to Open In Overleaf API GitOrigin-RevId: 2be4b7a0fe521fc4a4415100ac20190bf6e0df6a --- .../web/test/acceptance/coffee/helpers/MockV1Api.coffee | 8 ++++++++ .../coffee/References/ReferencesControllerTests.coffee | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/services/web/test/acceptance/coffee/helpers/MockV1Api.coffee b/services/web/test/acceptance/coffee/helpers/MockV1Api.coffee index 04c1b6446b..94004cee22 100644 --- a/services/web/test/acceptance/coffee/helpers/MockV1Api.coffee +++ b/services/web/test/acceptance/coffee/helpers/MockV1Api.coffee @@ -36,6 +36,8 @@ module.exports = MockV1Api = existingEmails: [] + brands: {} + setAffiliations: (affiliations) -> @affiliations = affiliations run: () -> @@ -85,6 +87,12 @@ module.exports = MockV1Api = app.delete "/api/v2/users/:userId/affiliations/:email", (req, res, next) => res.sendStatus 204 + app.get "/api/v2/brands/:slug", (req, res, next) => + if brand = @brands[req.params.slug] + res.json brand + else + res.sendStatus 404 + app.get '/universities/list', (req, res, next) -> res.json [] diff --git a/services/web/test/unit/coffee/References/ReferencesControllerTests.coffee b/services/web/test/unit/coffee/References/ReferencesControllerTests.coffee index 7af553d5ec..c612967c8d 100644 --- a/services/web/test/unit/coffee/References/ReferencesControllerTests.coffee +++ b/services/web/test/unit/coffee/References/ReferencesControllerTests.coffee @@ -114,7 +114,7 @@ describe "ReferencesController", -> @res.json.calledWith(@fakeResponseData).should.equal true done() - describe 'there is no dataaaaaaa', -> + describe 'there is no data', -> beforeEach -> @ReferencesHandler.indexAll.callsArgWith(1)