mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 18:05:13 -05:00
21 lines
581 B
CoffeeScript
21 lines
581 B
CoffeeScript
|
expect = require("chai").expect
|
||
|
async = require("async")
|
||
|
User = require "./helpers/User"
|
||
|
|
||
|
describe "Project CRUD", ->
|
||
|
before (done) ->
|
||
|
@user = new User()
|
||
|
@user.login done
|
||
|
|
||
|
describe "when project doesn't exist", ->
|
||
|
it "should return 404", (done) ->
|
||
|
@user.request.get "/project/aaaaaaaaaaaaaaaaaaaaaaaa", (err, res, body) ->
|
||
|
expect(res.statusCode).to.equal 404
|
||
|
done()
|
||
|
|
||
|
describe "when project has malformed id", ->
|
||
|
it "should return 404", (done) ->
|
||
|
@user.request.get "/project/blah", (err, res, body) ->
|
||
|
expect(res.statusCode).to.equal 404
|
||
|
done()
|
||
|
|