Domain\Employee\EmployeeRepositoryTest::test_restore PHP Method

test_restore() public method

public test_restore ( )
    public function test_restore()
    {
        $repo = App::make(EmployeeRepository::class);
        $employee = factory(Employee::class)->create();
        $repo->delete($employee->id);
        $restore = $repo->restore($employee->id);
        $get = $repo->get($employee->id);
        $this->assertEquals(1, $restore);
        $this->assertNull($get->deleted_at);
        $this->assertInstanceOf(Employee::class, $get);
    }