mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #1247 from sharelatex/sk-git-bridge-acceptance-tests
Git bridge acceptance tests (initial) GitOrigin-RevId: 66736ed568296674046b368861446eeb6eae664b
This commit is contained in:
parent
c423e483ba
commit
1836932256
2 changed files with 11 additions and 2 deletions
|
@ -47,6 +47,9 @@ module.exports = MockDocUpdaterApi =
|
||||||
app.delete "/project/:project_id/doc/:doc_id", (req, res, next) =>
|
app.delete "/project/:project_id/doc/:doc_id", (req, res, next) =>
|
||||||
res.sendStatus 204
|
res.sendStatus 204
|
||||||
|
|
||||||
|
app.post "/project/:project_id/history/resync", (req, res, next) =>
|
||||||
|
res.sendStatus 204
|
||||||
|
|
||||||
app.listen 3003, (error) ->
|
app.listen 3003, (error) ->
|
||||||
throw error if error?
|
throw error if error?
|
||||||
.on "error", (error) ->
|
.on "error", (error) ->
|
||||||
|
|
|
@ -17,7 +17,10 @@ module.exports = MockProjectHistoryApi =
|
||||||
@oldFiles["#{project_id}:#{version}:#{pathname}"] = content
|
@oldFiles["#{project_id}:#{version}:#{pathname}"] = content
|
||||||
|
|
||||||
setProjectVersion: (project_id, version) ->
|
setProjectVersion: (project_id, version) ->
|
||||||
@projectVersions[project_id] = version
|
@projectVersions[project_id] = {version: version}
|
||||||
|
|
||||||
|
setProjectVersionInfo: (project_id, versionInfo) ->
|
||||||
|
@projectVersions[project_id] = versionInfo
|
||||||
|
|
||||||
addLabel: (project_id, label_id, comment, version) ->
|
addLabel: (project_id, label_id, comment, version) ->
|
||||||
@labels[project_id] ?= {}
|
@labels[project_id] ?= {}
|
||||||
|
@ -50,7 +53,7 @@ module.exports = MockProjectHistoryApi =
|
||||||
app.get "/project/:project_id/version", (req, res, next) =>
|
app.get "/project/:project_id/version", (req, res, next) =>
|
||||||
{project_id} = req.params
|
{project_id} = req.params
|
||||||
if @projectVersions[project_id]?
|
if @projectVersions[project_id]?
|
||||||
res.json version: @projectVersions[project_id]
|
res.json @projectVersions[project_id]
|
||||||
else
|
else
|
||||||
res.send 404
|
res.send 404
|
||||||
|
|
||||||
|
@ -78,6 +81,9 @@ module.exports = MockProjectHistoryApi =
|
||||||
else
|
else
|
||||||
res.send 404
|
res.send 404
|
||||||
|
|
||||||
|
app.post "/project/:project_id/flush", (req, res, next) =>
|
||||||
|
res.sendStatus 200
|
||||||
|
|
||||||
app.listen 3054, (error) ->
|
app.listen 3054, (error) ->
|
||||||
throw error if error?
|
throw error if error?
|
||||||
.on "error", (error) ->
|
.on "error", (error) ->
|
||||||
|
|
Loading…
Reference in a new issue