mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
mock affiliations API in acceptance tests
This commit is contained in:
parent
e41391fb4a
commit
c81f9c24ed
2 changed files with 6 additions and 0 deletions
|
@ -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) ->
|
||||
|
|
|
@ -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?
|
||||
|
|
Loading…
Reference in a new issue