]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8761 minor improvement in root WS tests
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 9 Feb 2017 12:21:04 +0000 (13:21 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Fri, 10 Feb 2017 22:07:21 +0000 (23:07 +0100)
server/sonar-server/src/test/java/org/sonar/server/root/ws/SearchActionTest.java
server/sonar-server/src/test/java/org/sonar/server/root/ws/SetRootActionTest.java
server/sonar-server/src/test/java/org/sonar/server/root/ws/UnsetRootActionTest.java

index 77e97c97b27c58dbf30b540e825e1a456344694e..ac5020da77d610e39a21f55d12657322e37a39c8 100644 (file)
@@ -79,7 +79,7 @@ public class SearchActionTest {
 
   @Test
   public void execute_fails_with_ForbiddenException_when_user_is_not_root() {
-    userSessionRule.logIn();
+    userSessionRule.logIn().setNonRoot();
 
     expectInsufficientPrivilegesForbiddenException();
 
index f086a2bd6e19dcc232e343273fc706f6b8e893c6..135eac7c68d01d3de494ba57df06ab5d68428b33 100644 (file)
@@ -86,7 +86,7 @@ public class SetRootActionTest {
 
   @Test
   public void execute_fails_with_ForbiddenException_when_user_is_not_root() {
-    userSessionRule.logIn();
+    userSessionRule.logIn().setNonRoot();
 
     expectInsufficientPrivilegesForbiddenException();
 
index 63e4cb64dbf65e326b7a011616df240464779e05..a834f1511e737a2b1c2a69476079b6bb40021044 100644 (file)
@@ -87,7 +87,7 @@ public class UnsetRootActionTest {
 
   @Test
   public void execute_fails_with_ForbiddenException_when_user_is_not_root() {
-    userSessionRule.logIn();
+    userSessionRule.logIn().setNonRoot();
 
     expectInsufficientPrivilegesForbiddenException();