use of org.sonarqube.ws.WsQualityGates.GetByProjectWsResponse in project sonarqube by SonarSource.
the class GetByProjectActionTest method get_with_project_user_permission.
@Test
public void get_with_project_user_permission() {
ComponentDto project = componentDb.insertProject();
userSession.logIn().addProjectUuidPermissions(UserRole.USER, project.uuid());
QualityGateDto dbQualityGate = insertQualityGate("Sonar way");
setDefaultQualityGate(dbQualityGate.getId());
GetByProjectWsResponse result = callByUuid(project.uuid());
assertThat(result.getQualityGate().getName()).isEqualTo(dbQualityGate.getName());
}
Aggregations