mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-02-03 19:48:32 +00:00
156 - Getting Cozy with Stripe Connect
This commit is contained in:
30
tests/Browser/ConnectWithStripeTest.php
Normal file
30
tests/Browser/ConnectWithStripeTest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Browser;
|
||||
|
||||
use App\User;
|
||||
use Tests\DuskTestCase;
|
||||
use Laravel\Dusk\Browser;
|
||||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
|
||||
class ConnectWithStripeTest extends DuskTestCase
|
||||
{
|
||||
/** @test */
|
||||
public function connecting_a_stripe_account_successfully()
|
||||
{
|
||||
$user = factory(User::class)->create([
|
||||
'stripe_account_id' => null,
|
||||
'stripe_access_token' => null,
|
||||
]);
|
||||
|
||||
$this->browse(function (Browser $browser) use ($user) {
|
||||
$browser->loginAs($user)
|
||||
->visit('/backstage/stripe-connect/authorize')
|
||||
->assertUrlIs('https://connect.stripe.com/oauth/authorize')
|
||||
->assertQueryStringHas('response_type', 'code')
|
||||
->assertQueryStringHas('scope', 'read_write')
|
||||
->assertQueryStringHas('client_id', config('services.stripe.client_id'))
|
||||
;
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user