mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-26 21:21:41 +00:00
change copy test to match usage in web, check http status
This commit is contained in:
parent
dad209262f
commit
de465aee94
1 changed files with 4 additions and 2 deletions
|
@ -70,13 +70,15 @@ describe "Filestore", ->
|
|||
newProjectID = "acceptence_tests_copyied_project"
|
||||
newFileId = Math.random()
|
||||
newFileUrl = "#{@filestoreUrl}/project/#{newProjectID}/file/#{newFileId}"
|
||||
opts =
|
||||
opts =
|
||||
method: 'put'
|
||||
uri: newFileUrl
|
||||
json:
|
||||
source:
|
||||
project_id:"acceptence_tests"
|
||||
file_id: @file_id
|
||||
request.put opts, (err)=>
|
||||
request opts, (err, response, body)=>
|
||||
response.statusCode.should.equal 200
|
||||
request.del @fileUrl, (err, response, body)=>
|
||||
request.get newFileUrl, (err, response, body)=>
|
||||
body.should.equal @constantFileContent
|
||||
|
|
Loading…
Reference in a new issue