Add acceptance test for unimported read only token

This commit is contained in:
Alasdair Smith 2018-09-25 09:43:39 +01:00
parent ca895ae1b1
commit da16e8d01f

View file

@ -417,7 +417,7 @@ describe 'TokenAccess', ->
, done)
describe 'unimported v1 project', ->
it 'should redirect to v1', (done) ->
it 'should redirect read and write token to v1', (done) ->
unimportedV1Token = '123abc'
try_read_and_write_token_access(@owner, unimportedV1Token, (response, body) =>
expect(response.statusCode).to.equal 302
@ -425,3 +425,12 @@ describe 'TokenAccess', ->
'/sign_in_to_v1?return_to=http://overleaf.test:5000/123abc'
)
, done)
it 'should redirect read only token to v1', (done) ->
unimportedV1Token = 'abcd'
try_read_only_token_access(@owner, unimportedV1Token, (response, body) =>
expect(response.statusCode).to.equal 302
expect(response.headers.location).to.equal(
'http://overleaf.test:5000/read/abcd'
)
, done)