 
 		@error = "my errror"
 		@project_id = ObjectId().toString()
-		@stubbedError = new Errors.NotFoundError("blew up")
+		@stubbedError = new Errors.NotFoundError("Error in S3 request")
 
 	describe "archiveDoc", ->
 
 		it "should use correct options", (done)->
-			@request.put = sinon.stub().callsArgWith(1,  null, statusCode:200)
+			@request.put = sinon.stub().callsArgWith(1,  null, {statusCode:200,headers:{etag:""}})
 			@requires["request"] = @request
 			@DocArchiveManager = SandboxedModule.require modulePath, requires: @requires
 

				opts.uri.should.equal "https://#{@settings.filestore.stores.user_files}.s3.amazonaws.com/#{@project_id}/#{@docs[0]._id}"
				done()

		it "should return the error", (done)->
			@request.put = sinon.stub().callsArgWith(1, @error, {})
			@requires["request"] = @request
			@DocArchiveManager = SandboxedModule.require modulePath, requires: @requires

			@DocArchiveManager.archiveDoc @project_id, @docs[0], (err)=>
				err.should.equal @error
				done()

	describe "unarchiveDoc", ->

SandboxedModule = require('sandboxed-module')
ObjectId = require("mongojs").ObjectId
Errors = require "../../../app/js/Errors"
crypto = require("crypto")

describe "DocArchiveManager", ->

