|
|
@@ -350,7 +350,7 @@ describe('PageService', () => {
|
|
|
|
|
|
expect(xssSpy).toHaveBeenCalled();
|
|
|
|
|
|
- expect(pageEventSpy).toHaveBeenCalledWith('rename', parentForRename1, testUser2, null);
|
|
|
+ expect(pageEventSpy).toHaveBeenCalledWith('rename', parentForRename1, testUser2);
|
|
|
|
|
|
expect(resultPage.path).toBe('/renamed1');
|
|
|
expect(resultPage.updatedAt).toEqual(parentForRename1.updatedAt);
|
|
|
@@ -363,7 +363,7 @@ describe('PageService', () => {
|
|
|
|
|
|
expect(xssSpy).toHaveBeenCalled();
|
|
|
|
|
|
- expect(pageEventSpy).toHaveBeenCalledWith('rename', parentForRename2, testUser2, null);
|
|
|
+ expect(pageEventSpy).toHaveBeenCalledWith('rename', parentForRename2, testUser2);
|
|
|
|
|
|
expect(resultPage.path).toBe('/renamed2');
|
|
|
expect(resultPage.updatedAt).toEqual(dateToUse);
|
|
|
@@ -375,7 +375,7 @@ describe('PageService', () => {
|
|
|
const resultPage = await crowi.pageService.renamePage(parentForRename3, '/renamed3', testUser2, { createRedirectPage: true });
|
|
|
|
|
|
expect(xssSpy).toHaveBeenCalled();
|
|
|
- expect(pageEventSpy).toHaveBeenCalledWith('rename', parentForRename3, testUser2, null);
|
|
|
+ expect(pageEventSpy).toHaveBeenCalledWith('rename', parentForRename3, testUser2);
|
|
|
|
|
|
expect(resultPage.path).toBe('/renamed3');
|
|
|
expect(resultPage.updatedAt).toEqual(parentForRename3.updatedAt);
|
|
|
@@ -388,7 +388,7 @@ describe('PageService', () => {
|
|
|
|
|
|
expect(xssSpy).toHaveBeenCalled();
|
|
|
expect(renameDescendantsWithStreamSpy).toHaveBeenCalled();
|
|
|
- expect(pageEventSpy).toHaveBeenCalledWith('rename', parentForRename4, testUser2, null);
|
|
|
+ expect(pageEventSpy).toHaveBeenCalledWith('rename', parentForRename4, testUser2);
|
|
|
|
|
|
expect(resultPage.path).toBe('/renamed4');
|
|
|
expect(resultPage.updatedAt).toEqual(parentForRename4.updatedAt);
|
|
|
@@ -564,7 +564,7 @@ describe('PageService', () => {
|
|
|
expect(resultPage.updatedAt).toEqual(parentForDelete1.updatedAt);
|
|
|
expect(resultPage.lastUpdateUser).toEqual(testUser1._id);
|
|
|
|
|
|
- expect(pageEventSpy).toHaveBeenCalledWith('delete', parentForDelete1, testUser2, null);
|
|
|
+ expect(pageEventSpy).toHaveBeenCalledWith('delete', parentForDelete1, testUser2);
|
|
|
expect(pageEventSpy).toHaveBeenCalledWith('create', resultPage, testUser2);
|
|
|
});
|
|
|
|
|
|
@@ -581,7 +581,7 @@ describe('PageService', () => {
|
|
|
expect(resultPage.updatedAt).toEqual(parentForDelete2.updatedAt);
|
|
|
expect(resultPage.lastUpdateUser).toEqual(testUser1._id);
|
|
|
|
|
|
- expect(pageEventSpy).toHaveBeenCalledWith('delete', parentForDelete2, testUser2, null);
|
|
|
+ expect(pageEventSpy).toHaveBeenCalledWith('delete', parentForDelete2, testUser2);
|
|
|
expect(pageEventSpy).toHaveBeenCalledWith('create', resultPage, testUser2);
|
|
|
});
|
|
|
|