2017-05-23 03:03:30 -07:00
|
|
|
<?php
|
2017-06-12 17:39:03 -07:00
|
|
|
use App\Models\Department;
|
2017-05-23 03:03:30 -07:00
|
|
|
use App\Models\Location;
|
|
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
|
|
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
2017-06-12 17:39:03 -07:00
|
|
|
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
|
|
|
use Illuminate\Support\Facades\Hash;
|
2017-05-23 03:03:30 -07:00
|
|
|
|
2017-07-11 20:37:02 -07:00
|
|
|
class DepartmentTest extends BaseTest
|
2017-05-23 03:03:30 -07:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var \UnitTester
|
|
|
|
*/
|
|
|
|
protected $tester;
|
|
|
|
|
|
|
|
public function testDepartmentAdd()
|
|
|
|
{
|
2017-06-12 17:39:03 -07:00
|
|
|
$department = factory(Department::class)->make();
|
2017-05-23 03:03:30 -07:00
|
|
|
$values = [
|
|
|
|
'name' => $department->name,
|
2017-06-12 17:39:03 -07:00
|
|
|
'user_id' => $department->user_id,
|
|
|
|
'manager_id' => $department->manager_id,
|
2017-05-23 03:03:30 -07:00
|
|
|
];
|
|
|
|
|
|
|
|
Department::create($values);
|
|
|
|
$this->tester->seeRecord('departments', $values);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|