change copy test to match usage in web, check http status

This commit is contained in:
Brian Gough 2014-12-22 11:27:48 +00:00
parent dad209262f
commit de465aee94

View file

@ -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