Exemplo n.º 1
0
 /**
  * ProjectType::deleteTypesData()
  *
  */
 public function testDeleteTypesData()
 {
     $this->setVars();
     $projectType = ProjectType::where('project_id', $this->project->id)->first();
     $response = ProjectType::deleteTypesData($this->project->id, $projectType->type, 1);
     $this->assertInternalType('int', $response);
     $this->assertEquals(1, $response);
 }
Exemplo n.º 2
0
 /**
  * Handles POST requests for /project/{project_id}/{project_type}/delete-row
  *
  * @return json
  */
 public function postProjectTypeDeleteRow($project_id, $project_type)
 {
     ProjectType::deleteTypesData($project_id, $project_type, $this->input['row']);
     return Response::json(['error' => false, 'message' => 'Removed row successfully.']);
 }