Example #1
0
 public static void delete(Long project_id) {
   Project p = getActiveProject();
   if (p == null) {
     notFound();
   }
   p.delete(getLoggedin());
   Application.homepage();
 }
Example #2
0
  @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();
  }
Example #3
0
 public static Result deleteProject(Long projectId) {
   Project.delete(projectId);
   return redirect(routes.SiteApp.projectList(""));
 }