Created
February 23, 2021 18:17
-
-
Save jongravois/b3c896d76fa295a967efcddc81c909a0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Tests\Feature\Nimbbl; | |
use App\Http\Livewire\Invoices\InvoicesTable; | |
use App\Models\PostedInvoice; | |
use App\Models\User; | |
use Carbon\Carbon; | |
use Database\Seeders\PostedInvoicesTableSeeder; | |
use Illuminate\Support\Facades\Schema; | |
use Livewire\Livewire; | |
use Tests\TestCase; | |
class PostedInvoicesTest extends TestCase | |
{ | |
private $user; | |
public function setUp() : void | |
{ | |
parent::setUp(); | |
$this->user = User::factory()->create([ | |
'is_developer' => true | |
]); | |
$this->seed(PostedInvoicesTableSeeder::class); | |
} // end function | |
/** @test */ | |
public function check_database_for_seeder(): void | |
{ | |
$invs = PostedInvoice::all()->count(); | |
self::assertEquals(305, $invs); | |
} // end test | |
/** @test */ | |
public function part_sales_scope_returns_only_s_route_code(): void | |
{ | |
$sales = PostedInvoice::partsales()->count(); | |
self::assertEquals(272, $sales); | |
} // end test | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment