public static void delete(Long project_id) { Project p = getActiveProject(); if (p == null) { notFound(); } p.delete(getLoggedin()); Application.homepage(); }
@Test public void delete() { // Given User member = User.find.byId(2L); Project project = Project.findByOwnerAndProjectName("yobi", "projectYobi"); RecentlyVisitedProjects.addNewVisitation(member, project); // When project.delete(); // Then assertThat(Project.findByOwnerAndProjectName("yobi", "projectYobi")).isNull(); }
public static Result deleteProject(Long projectId) { Project.delete(projectId); return redirect(routes.SiteApp.projectList("")); }