feat: engagment notifications
This commit is contained in:
@@ -43,6 +43,8 @@ it('creates one review per user for a meal post', function () {
|
||||
});
|
||||
|
||||
it('sends a push notification to the meal owner when another user comments on their meal', function () {
|
||||
config()->set('app.mobile_scheme', 'dailymeal');
|
||||
|
||||
Http::fake([
|
||||
'https://exp.host/*' => Http::response([
|
||||
'data' => [
|
||||
@@ -77,7 +79,7 @@ it('sends a push notification to the meal owner when another user comments on th
|
||||
'sound' => 'default',
|
||||
'channelId' => 'default',
|
||||
'data' => [
|
||||
'url' => "bowly://meals/{$mealPost->id}",
|
||||
'url' => "dailymeal://meals/{$mealPost->id}",
|
||||
],
|
||||
],
|
||||
]);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
it('schedules expired auth and stale device token cleanup commands', function () {
|
||||
it('schedules maintenance and engagement commands', function () {
|
||||
Artisan::call('schedule:list', [
|
||||
'--json' => true,
|
||||
]);
|
||||
@@ -13,5 +13,6 @@ it('schedules expired auth and stale device token cleanup commands', function ()
|
||||
expect($commands)
|
||||
->toContain('php artisan sanctum:prune-expired --hours=24')
|
||||
->toContain('php artisan auth:clear-resets')
|
||||
->toContain('php artisan device-tokens:prune-stale --days=180');
|
||||
->toContain('php artisan device-tokens:prune-stale --days=180')
|
||||
->toContain('php artisan notifications:send-engagement-reminders');
|
||||
});
|
||||
|
||||
@@ -38,6 +38,8 @@ it('returns a strava authorization url for the api callback', function () {
|
||||
});
|
||||
|
||||
it('redirects the strava web callback to the mobile app', function () {
|
||||
config()->set('app.mobile_scheme', 'dailymeal');
|
||||
|
||||
$query = http_build_query([
|
||||
'code' => 'authorization-code',
|
||||
'scope' => 'read activity:read',
|
||||
@@ -46,7 +48,7 @@ it('redirects the strava web callback to the mobile app', function () {
|
||||
|
||||
$this
|
||||
->get("/strava/callback?{$query}")
|
||||
->assertRedirect("bowly://strava/callback?{$query}");
|
||||
->assertRedirect("dailymeal://strava/callback?{$query}");
|
||||
});
|
||||
|
||||
it('stores strava tokens from an authorization code', function () {
|
||||
|
||||
Reference in New Issue
Block a user