Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Nov 13, 2024
1 parent f8ea193 commit 8f1e845
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/Actions/SendPasswordResetNotificationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Cone\Root\Tests\Actions;

use Cone\Root\Actions\SendPasswordResetNotification;
use Cone\Root\Notifications\ResetPassword;
use Cone\Root\Tests\TestCase;
use Cone\Root\Tests\User;
use Illuminate\Auth\Notifications\ResetPassword;
use Illuminate\Support\Facades\Notification;

class SendPasswordResetNotificationTest extends TestCase
Expand All @@ -24,6 +24,6 @@ public function test_send_password_reset_notifications_action(): void

$action->perform($this->app['request']);

Notification::assertNotSentTo($user, ResetPassword::class);
Notification::assertSentTo($user, ResetPassword::class);
}
}
6 changes: 3 additions & 3 deletions tests/Actions/SendVerificationNotificationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Cone\Root\Tests\Actions;

use Cone\Root\Actions\SendVerificationNotification;
use Cone\Root\Notifications\VerifyEmail;
use Cone\Root\Tests\TestCase;
use Cone\Root\Tests\User;
use Illuminate\Auth\Notifications\VerifyEmail;
use Illuminate\Support\Facades\Notification;

class SendVerificationNotificationTest extends TestCase
Expand All @@ -16,14 +16,14 @@ public function test_send_verification_notifications_action(): void

$action = new SendVerificationNotification;

$user = User::factory()->create();
$user = User::factory()->unverified()->create();

$action->withQuery(fn () => User::query());

$this->app['request']->merge(['models' => [$user->getKey()]]);

$action->perform($this->app['request']);

Notification::assertNotSentTo($user, VerifyEmail::class);
Notification::assertSentTo($user, VerifyEmail::class);
}
}

0 comments on commit 8f1e845

Please sign in to comment.