Created
December 18, 2018 12:46
-
-
Save devmsh/f789a15c43d81fdad3828b585afc29d4 to your computer and use it in GitHub Desktop.
MultipleMobileTest.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class MultipleMobileTest extends TestCase | |
| { | |
| public function test_user_can_add_new_mobile() | |
| { | |
| $unverifiedUser = $this->newUnverifiedUser([ | |
| 'mobile' => '970567940999' | |
| ]); | |
| $user = $this->newVerifiedUser(); | |
| $response = $this->postJson('api/user/mobiles', [ | |
| 'mobile' => '970567940999', | |
| ]); | |
| $response->assertSuccessful(); | |
| $this->assertCount(2, $user->mobiles); | |
| $this->assertNull($unverifiedUser->fresh()); | |
| Notification::assertSentTo($user, CheckInvitationsNotification::class); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment