Closed stueynet closed 5 years ago
Nevermind this worked!
CaptchaFacade::shouldReceive('verify')
->andReturn(true);
$this->post('/register', [
'username' => 'TestUser',
'email' => 'foo@example.com',
'password' => 'Password123',
'password_confirmation' => 'Password123',
'terms' => '1',
'g-recaptcha-response' => '1',
]);
$this->assertDatabaseHas('users', [
'email' => 'foo@example.com',
'username' => 'TestUser',
]);
Read the testing instructions which work well if you are testing forms but what about testing using a simple post request? Thanks in advance for the help!
Eg: