Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-23492

Bad error message when copying a wiki to an id that already exists

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 17.8.0-rc-1
    • 16.10.0
    • Wiki
    • None
    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      Right now:

          @Test
          void copyWhenWikiAlreadyExists() throws Exception
          {
              when(this.store.isWikiNameAvailable(any(String.class), any(XWikiContext.class))).thenReturn(true);
              // The wiki already exists
              when(this.wikiDescriptorManager.exists("existingid")).thenReturn(true);
      
              Throwable exception = assertThrows(WikiManagerException.class, () -> {
                  this.wikiManager.copy("wikiid", "existingid", "newwikialias", true, true, true);
              });
              assertEquals("The wiki id [existingid] is already used or is a reserved id, and thus is not available.",
                  exception.getMessage());
          }
      

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: