2016-03-25 01:18:05 -07:00
|
|
|
<?php
|
|
|
|
use App\Models\Accessory;
|
|
|
|
use Illuminate\Support\Facades\Hash;
|
|
|
|
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
|
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
|
|
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
|
|
|
|
|
|
|
class AccessoryTest extends \Codeception\TestCase\Test
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var \UnitTester
|
|
|
|
*/
|
|
|
|
protected $tester;
|
|
|
|
use DatabaseMigrations;
|
|
|
|
|
|
|
|
public function testAccessoryAdd()
|
|
|
|
{
|
2016-04-13 02:19:29 -07:00
|
|
|
$accessory = factory(Accessory::class, 'accessory')->make();
|
2016-03-25 01:18:05 -07:00
|
|
|
$values = [
|
|
|
|
'name' => $accessory->name,
|
|
|
|
'category_id' => $accessory->category_id,
|
|
|
|
'qty' => $accessory->qty,
|
|
|
|
];
|
|
|
|
|
|
|
|
Accessory::create($values);
|
|
|
|
$this->tester->seeRecord('accessories', $values);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|