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

@ -71,12 +71,14 @@ describe "Filestore", ->
newFileId = Math.random()
newFileUrl = "#{@filestoreUrl}/project/#{newProjectID}/file/#{newFileId}"
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