snipe-it/tests/unit/SupplierTest.php
2016-03-25 01:18:05 -07:00

28 lines
647 B
PHP

<?php
use App\Models\Supplier;
use Illuminate\Support\Facades\Hash;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class SupplierTest extends \Codeception\TestCase\Test
{
/**
* @var \UnitTester
*/
protected $tester;
use DatabaseMigrations;
public function testSupplierAdd()
{
$supplier = factory(Supplier::class, 'supplier')->make();
$values = [
'name' => $supplier->name,
];
Supplier::create($values);
$this->tester->seeRecord('suppliers', $values);
}
}