mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
start ProjectInvite acceptance test module
This commit is contained in:
parent
254705c3f1
commit
748851b51e
1 changed files with 50 additions and 0 deletions
|
@ -0,0 +1,50 @@
|
||||||
|
expect = require("chai").expect
|
||||||
|
Async = require("async")
|
||||||
|
User = require "./helpers/User"
|
||||||
|
request = require "./helpers/request"
|
||||||
|
settings = require "settings-sharelatex"
|
||||||
|
|
||||||
|
describe "ProjectInviteTests", ->
|
||||||
|
before (done) ->
|
||||||
|
@timeout(20000)
|
||||||
|
@sendingUser = new User()
|
||||||
|
@user = new User()
|
||||||
|
@site_admin = new User({email: "admin@example.com"})
|
||||||
|
@projectId = null
|
||||||
|
Async.series [
|
||||||
|
(cb) => @user.login cb
|
||||||
|
(cb) => @user.logout cb
|
||||||
|
(cb) => @sendingUser.login cb
|
||||||
|
(cb) => @sendingUser.createProject('sharing test', (err, projectId) =>
|
||||||
|
throw err if err
|
||||||
|
@projectId = projectId
|
||||||
|
cb()
|
||||||
|
)
|
||||||
|
(cb) => @sendingUser.logout cb
|
||||||
|
], done
|
||||||
|
|
||||||
|
describe "user is logged in", ->
|
||||||
|
|
||||||
|
beforeEach (done) ->
|
||||||
|
@user.login (err) =>
|
||||||
|
if err
|
||||||
|
throw err
|
||||||
|
done()
|
||||||
|
|
||||||
|
describe 'user is already a member of the project', ->
|
||||||
|
|
||||||
|
beforeEach ->
|
||||||
|
|
||||||
|
it 'should redirect to the project page', (done) ->
|
||||||
|
Async.series(
|
||||||
|
[
|
||||||
|
(cb) =>
|
||||||
|
cb()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
], (err, result) =>
|
||||||
|
if err
|
||||||
|
throw err
|
||||||
|
done()
|
||||||
|
)
|
Loading…
Reference in a new issue