Improve testing of archiving and be explicit about include_deleted parameter
This commit is contained in:
@@ -106,7 +106,7 @@ describe "DocManager", ->
|
||||
|
||||
it "should get the project from the database", ->
|
||||
@MongoManager.getProjectsDocs
|
||||
.calledWith(@project_id, false)
|
||||
.calledWith(@project_id, {include_deleted: false})
|
||||
.should.equal true
|
||||
|
||||
it "should return the docs", ->
|
||||
|
||||
@@ -43,7 +43,7 @@ describe "MongoManager", ->
|
||||
|
||||
describe "with included_deleted = false", ->
|
||||
beforeEach ->
|
||||
@MongoManager.getProjectsDocs @project_id, false, @callback
|
||||
@MongoManager.getProjectsDocs @project_id, include_deleted: false, @callback
|
||||
|
||||
it "should find the non-deleted docs via the project_id", ->
|
||||
@db.docs.find
|
||||
@@ -58,7 +58,7 @@ describe "MongoManager", ->
|
||||
|
||||
describe "with included_deleted = true", ->
|
||||
beforeEach ->
|
||||
@MongoManager.getProjectsDocs @project_id, true, @callback
|
||||
@MongoManager.getProjectsDocs @project_id, include_deleted: true, @callback
|
||||
|
||||
it "should find all via the project_id", ->
|
||||
@db.docs.find
|
||||
|
||||
Reference in New Issue
Block a user