|
|
@@ -112,6 +112,18 @@ describe('CollaboratorsHandler', function () {
|
|
|
)
|
|
|
.chain('exec')
|
|
|
.resolves()
|
|
|
+ this.ProjectMock.expects('updateOne')
|
|
|
+ .withArgs(
|
|
|
+ {
|
|
|
+ _id: this.project._id,
|
|
|
+ readOnly_refs: { $type: 'null' },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ $set: { readOnly_refs: [] },
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .chain('exec')
|
|
|
+ .resolves()
|
|
|
this.ProjectMock.expects('updateOne')
|
|
|
.withArgs(
|
|
|
{
|
|
|
@@ -166,6 +178,18 @@ describe('CollaboratorsHandler', function () {
|
|
|
)
|
|
|
.chain('exec')
|
|
|
.resolves()
|
|
|
+ this.ProjectMock.expects('updateOne')
|
|
|
+ .withArgs(
|
|
|
+ {
|
|
|
+ _id: this.oldArchivedProject._id,
|
|
|
+ readOnly_refs: { $type: 'null' },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ $set: { readOnly_refs: [] },
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .chain('exec')
|
|
|
+ .resolves()
|
|
|
this.ProjectMock.expects('updateOne')
|
|
|
.withArgs(
|
|
|
{
|
|
|
@@ -218,6 +242,18 @@ describe('CollaboratorsHandler', function () {
|
|
|
)
|
|
|
.chain('exec')
|
|
|
.resolves()
|
|
|
+ this.ProjectMock.expects('updateOne')
|
|
|
+ .withArgs(
|
|
|
+ {
|
|
|
+ _id: this.archivedProject._id,
|
|
|
+ readOnly_refs: { $type: 'null' },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ $set: { readOnly_refs: [] },
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .chain('exec')
|
|
|
+ .resolves()
|
|
|
this.ProjectMock.expects('updateOne')
|
|
|
.withArgs(
|
|
|
{
|
|
|
@@ -517,6 +553,18 @@ describe('CollaboratorsHandler', function () {
|
|
|
)
|
|
|
.chain('exec')
|
|
|
.resolves()
|
|
|
+ this.ProjectMock.expects('updateOne')
|
|
|
+ .withArgs(
|
|
|
+ {
|
|
|
+ _id: projectId,
|
|
|
+ readOnly_refs: { $type: 'null' },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ $set: { readOnly_refs: [] },
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .chain('exec')
|
|
|
+ .resolves()
|
|
|
this.ProjectMock.expects('updateOne')
|
|
|
.withArgs(
|
|
|
{
|