mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-20 08:52:15 +00:00
- set password backend
This commit is contained in:
@@ -53,7 +53,7 @@ class OasisSubscriptionTest extends TestCase
|
||||
'creator' => 'john@doe.com',
|
||||
]);
|
||||
|
||||
$this->getJson("/api/oasis/subscription-request/{$user->subscriptionRequest->id}")
|
||||
$this->getJson("/api/oasis/subscribe/{$user->subscriptionRequest->id}")
|
||||
->assertStatus(200)
|
||||
->assertJsonFragment([
|
||||
'id' => $user->subscriptionRequest->id,
|
||||
@@ -140,4 +140,30 @@ class OasisSubscriptionTest extends TestCase
|
||||
'card_brand' => null,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function it_set_password_after_successful_payment()
|
||||
{
|
||||
$user = User::factory(User::class)
|
||||
->create(['role' => 'user']);
|
||||
|
||||
$user
|
||||
->subscriptionRequest()
|
||||
->create([
|
||||
'requested_plan' => 'virtualni-sanon-basic',
|
||||
'creator' => 'john@doe.com',
|
||||
'status' => 'payed',
|
||||
]);
|
||||
|
||||
$this->post("/oasis/subscribe/{$user->subscriptionRequest->id}/set-password", [
|
||||
'password' => 'vuefilemanager',
|
||||
'password_confirmation' => 'vuefilemanager',
|
||||
])->assertStatus(204);
|
||||
|
||||
$this->assertDatabaseHas('subscription_requests', [
|
||||
'status' => 'logged'
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user