use of com.searchcode.app.config.SQLiteMemoryDatabaseConfig in project searchcode-server by boyter.
the class ApiRouteServiceTest method testRepoListApiEnabledNoAuth.
public void testRepoListApiEnabledNoAuth() {
Request mockRequest = Mockito.mock(Request.class);
Repo repo = new Repo(new SQLiteMemoryDatabaseConfig(), new Helpers());
repo.createTableIfMissing();
ApiRouteService apiRouteService = new ApiRouteService(null, null, repo, null, null);
apiRouteService.apiEnabled = true;
apiRouteService.apiAuth = false;
RepoResultApiResponse apiResponse = apiRouteService.repoList(mockRequest, null);
assertThat(apiResponse.getMessage()).isEmpty();
assertThat(apiResponse.getRepoResultList()).hasSize(0);
assertThat(apiResponse.isSucessful()).isTrue();
}
Aggregations