Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | public function test_fires_pin_change_notification(): void |
||
17 | { |
||
18 | Notification::fake(); |
||
19 | |||
20 | Notification::assertNothingSent(); |
||
21 | |||
22 | $user = TestUser::create([ |
||
23 | 'name' => str::random(), |
||
24 | 'email' => Str::random(40) . '@example.com', |
||
25 | 'password' => Hash::make('password'), |
||
26 | 'pin' => Hash::make('0000'), |
||
27 | ]); |
||
28 | |||
29 | $this->actingAs($user); |
||
30 | $user->notify(new PinChange()); |
||
31 | |||
32 | Notification::assertSentTo( |
||
33 | [$user], PinChange::class |
||
34 | ); |
||
35 | |||
36 | Notification::assertCount(1); |
||
37 | } |
||
39 |