diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2017-08-24 12:33:37 +0200 |
---|---|---|
committer | Janos Gyerik <janos.gyerik@sonarsource.com> | 2017-09-12 11:34:50 +0200 |
commit | 87c853388232954ae7277a82f521e263571e93d6 (patch) | |
tree | 997b795ba9fbe1a851fa424bbdc2c85db54d5957 /tests | |
parent | 00a61114b3f0a16fab5b932cef6733542d5e9239 (diff) | |
download | sonarqube-87c853388232954ae7277a82f521e263571e93d6.tar.gz sonarqube-87c853388232954ae7277a82f521e263571e93d6.zip |
SONAR-9616 api/navigation/global returns branchesEnabled
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/test/java/org/sonarqube/tests/branch/BranchTest.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/src/test/java/org/sonarqube/tests/branch/BranchTest.java b/tests/src/test/java/org/sonarqube/tests/branch/BranchTest.java index 3be6b17d4c3..18b7808b770 100644 --- a/tests/src/test/java/org/sonarqube/tests/branch/BranchTest.java +++ b/tests/src/test/java/org/sonarqube/tests/branch/BranchTest.java @@ -21,6 +21,7 @@ package org.sonarqube.tests.branch; import com.sonar.orchestrator.Orchestrator; +import java.util.Map; import org.assertj.core.groups.Tuple; import org.junit.ClassRule; import org.junit.Rule; @@ -29,6 +30,9 @@ import org.sonarqube.tests.Category1Suite; import org.sonarqube.tests.Tester; import org.sonarqube.ws.Common; import org.sonarqube.ws.WsBranches; +import org.sonarqube.ws.client.GetRequest; +import org.sonarqube.ws.client.WsResponse; +import util.ItUtils; import static org.assertj.core.api.Java6Assertions.assertThat; import static util.ItUtils.runProjectAnalysis; @@ -51,4 +55,12 @@ public class BranchTest { .extracting(WsBranches.Branch::getName, WsBranches.Branch::getType, WsBranches.Branch::getIsMain) .containsExactlyInAnyOrder(Tuple.tuple("master", Common.BranchType.LONG, true)); } + + @Test + public void navigation_global_return_branches_support_to_false() { + WsResponse status =tester.wsClient().wsConnector().call(new GetRequest("api/navigation/global")); + Map<String, Object> statusMap = ItUtils.jsonToMap(status.content()); + + assertThat(statusMap.get("branchesEnabled")).isEqualTo(false); + } } |