Skip to content

Instantly share code, notes, and snippets.

@jongravois
Created February 23, 2021 18:17
Show Gist options
  • Save jongravois/b3c896d76fa295a967efcddc81c909a0 to your computer and use it in GitHub Desktop.
Save jongravois/b3c896d76fa295a967efcddc81c909a0 to your computer and use it in GitHub Desktop.
<?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