mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 11:14:06 +00:00
130 - Creating a Custom OrderFactory
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
namespace Tests\Features\Backstage;
|
||||
|
||||
use App\User;
|
||||
use OrderFactory;
|
||||
use Carbon\Carbon;
|
||||
use ConcertFactory;
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
@@ -20,6 +22,8 @@ class ViewPublishedConcertOrdersTest extends TestCase
|
||||
$user = factory(User::class)->create();
|
||||
$concert = ConcertFactory::createPublished(['user_id' => $user->id]);
|
||||
|
||||
$order = OrderFactory::createForConcert($concert, ['created_at' => Carbon::parse('11 days ago')]);
|
||||
|
||||
$response = $this->actingAs($user)->get("/backstage/published-concerts/{$concert->id}/orders");
|
||||
|
||||
$response->assertStatus(200);
|
||||
|
||||
Reference in New Issue
Block a user