mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
mock affiliations API in acceptance tests
This commit is contained in:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user