public void testShouldNotDisplayRevertActionForLocalUnchangedPages() throws Exception { expectStateOfPageIs(FS_PARENT_PAGE, VERSIONED); replay(revisionController); createPage(FS_PARENT_PAGE); request.setResource(FS_PARENT_PAGE); invokeResponderAndCheckResponseContains(); assertActionIsNotPresent(RevisionControlOperation.CHECKIN); assertActionIsPresent(RevisionControlOperation.UPDATE); assertActionIsNotPresent(RevisionControlOperation.REVERT); assertActionIsPresent(RevisionControlOperation.STATUS); }
public void testShouldMakeAddToRevisionControlActionForPages() throws Exception { expectStateOfPageIs(FS_PARENT_PAGE, UNKNOWN); replay(revisionController); createPage(FS_PARENT_PAGE); request.setResource(FS_PARENT_PAGE); invokeResponderAndCheckResponseContains(); assertActionIsPresent(RevisionControlOperation.ADD); assertActionIsNotPresent(RevisionControlOperation.CHECKIN); assertActionIsNotPresent(RevisionControlOperation.CHECKIN); assertActionIsNotPresent(RevisionControlOperation.REVERT); assertActionIsNotPresent(RevisionControlOperation.STATUS); }
public void testShouldNotMakeRevisionControlActionsIfPageIsNotEditableNorImported() throws Exception { expectStateOfPageIs(FS_PARENT_PAGE, VERSIONED); replay(revisionController); createPage(FS_PARENT_PAGE); final PageData pageData = parentPage.getData(); pageData.removeAttribute("Edit"); parentPage.commit(pageData); request.setResource(FS_PARENT_PAGE); invokeResponderAndCheckResponseContains(); assertRevisionControlItemsNotDisplayed(); }