Skip to content
Snippets Groups Projects
Commit 4209deba authored by tmortagne's avatar tmortagne
Browse files

[misc] Fix test

parent 9c790766
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,6 @@
import org.xwiki.model.reference.EntityReference;
import org.xwiki.model.reference.SpaceReference;
import org.xwiki.model.reference.WikiReference;
import org.xwiki.search.solr.script.SolrIndexScriptService;
import org.xwiki.security.authorization.AuthorizationManager;
import org.xwiki.security.authorization.Right;
import org.xwiki.test.mockito.MockitoComponentMockingRule;
......@@ -80,10 +79,6 @@ public class SolrIndexScriptServiceTest
@Before
public void setUp() throws Exception
{
this.service = mocker.getComponentUnderTest();
this.logger = mocker.getMockedLogger();
this.userReference = new DocumentReference("wiki", "space", "user");
// Context
......@@ -107,7 +102,10 @@ public void setUp() throws Exception
when(mockAuthorization.hasAccess(any(Right.class), any(DocumentReference.class), any(EntityReference.class)))
.thenReturn(true);
this.service = mocker.getComponentUnderTest();
// Rights check success. By default we are allowed (no error is thrown)
this.logger = mocker.getMockedLogger();
verify(this.logger, never()).error(anyString(), any(IllegalAccessException.class));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment