Browse Source

Fixed project status_id not updated on project edit page

pull/12/head
Nafies Luthfi 8 years ago
parent
commit
539c4ca985
  1. 1
      app/Http/Requests/Projects/UpdateRequest.php
  2. 6
      tests/Feature/ManageProjectsTest.php

1
app/Http/Requests/Projects/UpdateRequest.php

@ -36,6 +36,7 @@ class UpdateRequest extends Request
'due_date' => 'nullable|date|date_format:Y-m-d',
'project_value' => 'nullable|numeric',
'customer_id' => 'nullable|numeric',
'status_id' => 'required|numeric',
];
}
}

6
tests/Feature/ManageProjectsTest.php

@ -120,7 +120,10 @@ class ManageProjectsTest extends TestCase
{
$user = $this->adminUserSigningIn();
$customer = factory(Customer::class)->create();
$project = factory(Project::class)->create(['customer_id' => $customer->id]);
$project = factory(Project::class)->create([
'customer_id' => $customer->id,
'status_id' => 2,
]);
$this->visit(route('projects.edit', $project));
$this->seePageIs(route('projects.edit', $project));
@ -150,6 +153,7 @@ class ManageProjectsTest extends TestCase
'due_date' => '2016-05-10',
'proposal_value' => 2000000,
'project_value' => 2000000,
'status_id' => 4,
'customer_id' => $customer->id,
'description' => 'Edit deskripsi project',
]);

Loading…
Cancel
Save