Add test for redirecting to v1 if project unimported

This commit is contained in:
Alasdair Smith 2018-09-11 16:45:39 +01:00
parent 24495f3340
commit cf8ae7c28c
2 changed files with 10 additions and 0 deletions

View file

@ -415,3 +415,10 @@ describe 'TokenAccess', ->
try_content_access(@other2, @project_id, (response, body) =>
expect(body.privilegeLevel).to.equal false
, done)
describe 'unimported v1 project', ->
it 'should redirect to v1', (done) ->
unimportedV1Token = '123abc'
try_read_and_write_token_access(@owner, unimportedV1Token, (response, body) =>
expect(response.statusCode).to.equal 302
, done)

View file

@ -105,3 +105,6 @@ module.exports =
path: (params) -> "/universities/list/#{params.id}"
'/institutions/domains': { baseUrl: v1Api.url, path: '/university/domains' }
'/proxy/missing/baseUrl': path: '/foo/bar'
overleaf:
host: "http://#{process.env['V1_HOST']}:5000"