2016-03-25 01:18:05 -07:00
|
|
|
<?php
|
|
|
|
use App\Models\Location;
|
|
|
|
use Illuminate\Support\Facades\Hash;
|
|
|
|
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
|
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
|
|
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
|
|
|
|
|
|
|
class LocationTest extends \Codeception\TestCase\Test
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var \UnitTester
|
|
|
|
*/
|
|
|
|
protected $tester;
|
|
|
|
use DatabaseMigrations;
|
|
|
|
|
2017-05-23 03:03:25 -07:00
|
|
|
public function testLocationAdd()
|
2016-03-25 01:18:05 -07:00
|
|
|
{
|
|
|
|
$location = factory(Location::class, 'location')->make();
|
|
|
|
$values = [
|
|
|
|
'name' => $location->name,
|
|
|
|
];
|
|
|
|
|
|
|
|
Location::create($values);
|
|
|
|
$this->tester->seeRecord('locations', $values);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|