Skip to content

Commit

Permalink
fix: updated test case name and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
“sneha122” committed Oct 30, 2024
1 parent 04b4b87 commit cdd2e38
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ public void testDeleteActionCollection_afterApplicationPublish_clearsActionColle

@Test
@WithUserDetails(value = "api_user")
public void testUpdateUnpublishedActionCollection_withValidCollection_callsPageLayoutOnlyOnce() {
public void testUpdateUnpublishedActionCollection_withValidCollection_callsPageLayoutAndFindPageByIdOnlyOnce() {
Mockito.when(pluginExecutorHelper.getPluginExecutor(Mockito.any())).thenReturn(Mono.just(pluginExecutor));
Mockito.when(pluginExecutor.getHintMessages(Mockito.any(), Mockito.any()))
.thenReturn(Mono.zip(Mono.just(new HashSet<>()), Mono.just(new HashSet<>())));
Expand Down Expand Up @@ -770,7 +770,8 @@ public void testUpdateUnpublishedActionCollection_withValidCollection_callsPageL
// This gets called 4 times:
// 2 times during createCollection -> a. getExistingEntityNames and b. updatePageLayoutsByPageId
// 1 time during setup of this test case
// 1 time during update action collection
// 1 time during update action collection -> As expected as find page by id should be called only
// once in updatePageLayoutsByPageId
Mockito.verify(newPageService, Mockito.times(4))
.findPageById(Mockito.anyString(), Mockito.any(), Mockito.anyBoolean());
})
Expand Down

0 comments on commit cdd2e38

Please sign in to comment.