Files
dots-bot-api/tests/Feature/CompanyTest.php
T
KKlochko c22945926c
continuous-integration/drone/push Build is passing
Refactor the City, Company and their tests.
2023-08-16 17:47:22 +03:00

32 lines
618 B
PHP

<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
use App\Models\Company;
class CompanyTest extends TestCase
{
public function testIsExistForExistingCompany()
{
$name = 'testCompany';
$id = Company::where('name', $name)->first()->id;
$isExist = Company::isExist($id);
$this->assertTrue($isExist);
}
public function testIsExistForNonExistingCompany()
{
$id = 1234;
$isExist = Company::isExist($id);
$this->assertFalse($isExist);
}
}