mock affiliations API in acceptance tests

This commit is contained in:
Tim Alby 2018-06-21 17:59:35 +02:00
parent e41391fb4a
commit c81f9c24ed
2 changed files with 6 additions and 0 deletions

View file

@ -4,6 +4,7 @@ User = require "./helpers/User"
request = require "./helpers/request"
settings = require "settings-sharelatex"
{db, ObjectId} = require("../../../app/js/infrastructure/mongojs")
MockV1Api = require "./helpers/MockV1Api"
describe "UserEmails", ->
beforeEach (done) ->

View file

@ -42,6 +42,11 @@ module.exports = MockV1Api =
@exportParams = Object.assign({}, req.body)
res.json exportId: @exportId
app.post "/api/v2/users/:userId/affiliations", (req, res, next) =>
res.sendStatus 201
app.delete "/api/v2/users/:userId/affiliations/:email", (req, res, next) =>
res.sendStatus 204
app.listen 5000, (error) ->
throw error if error?