Notification::assertSentTo($user, UserInviteNotification::class);
}
+ public function test_create_with_send_invite_works_with_value_of_1()
+ {
+ $this->actingAsApiAdmin();
+ Notification::fake();
+
+ $resp = $this->postJson($this->baseEndpoint, [
+ 'name' => 'Benny Boris',
+ 'send_invite' => '1', // Submissions via x-www-form-urlencoded/form-data may use 1 instead of boolean
+ ]);
+
+ $resp->assertStatus(200);
+ /** @var User $user */
+ Notification::assertSentTo($user, UserInviteNotification::class);
+ }
+
public function test_create_name_and_email_validation()
{
$this->actingAsApiAdmin();