May 22, 2020
0
Level 1
Testing Spark Registration Route
I literally never have any luck here, but here goes...
I'm trying to test Spark Registration, but it's not working. I have:
public function testUserRegistration(array $overrideFields = []): TestResponse {
$response = $this->post('/register', array_merge($this->userRegistrationData(), $overrideFields));
$response->assertStatus(200);
}
The error I'm getting is "The payment method you provided has already been attached to a user". The thing is, the payment method changes with each registration. I tried passing a random one and of course it doesn't work.
In this extremely outdated test, he seems to be calling $this->getStripeToken() and has a Class of InteractsWithPaymentProviders, but these seem to be deprecated as I can't access them.
Does anyone have any clue how to test these routes?
Please or to participate in this conversation.