use of org.eclipse.che.api.core.model.project.ProjectConfig in project che by eclipse.
the class WorkspaceServiceTest method shouldDeleteProject.
@Test
public void shouldDeleteProject() throws Exception {
final WorkspaceImpl workspace = createWorkspace(createConfigDto());
when(wsManager.getWorkspace(workspace.getId())).thenReturn(workspace);
final ProjectConfig firstProject = workspace.getConfig().getProjects().iterator().next();
final Response response = given().auth().basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD).when().delete(SECURE_PATH + "/workspace/" + workspace.getId() + "/project" + firstProject.getPath());
assertEquals(response.getStatusCode(), 204);
verify(wsManager).updateWorkspace(any(), any());
}
Aggregations