Mark projects as archived, but don't actually delete them

This commit is contained in:
James Allen
2014-04-28 12:53:43 +01:00
parent 6dd792e5e9
commit d528ac21a3
4 changed files with 13 additions and 14 deletions
@@ -61,7 +61,7 @@ describe 'Project deleter', ->
describe "deleteProject", ->
beforeEach ->
@Project.remove.callsArgWith(1)
@Project.update.callsArgWith(2)
it "should flushProjectToMongoAndDelete in doc updater", (done)->
@deleter.deleteProject @project_id, =>
@@ -70,7 +70,11 @@ describe 'Project deleter', ->
it "should remove the project", (done)->
@deleter.deleteProject @project_id, =>
@Project.remove.calledWith(_id:@project_id).should.equal true
@Project.update.calledWith({
_id:@project_id
}, {
$set: { archived: true }
}).should.equal true
done()
it "should removeProjectFromAllTags", (done)->