feat: revenue cat
CI / 🧪 Tests Laravel (push) Successful in 2m24s
CI / 🐳 Build & Push Image (push) Successful in 1m13s

This commit is contained in:
2026-08-12 16:00:11 +02:00
parent 31633cfd2c
commit 29e85589b0
55 changed files with 703 additions and 2363 deletions
+13 -5
View File
@@ -27,7 +27,9 @@ function fakeMealAnalysisImage(): UploadedFile
it('analyzes a meal image into a draft', function () {
$user = User::factory()->create([
'trial_ends_at' => now()->addDay(),
'subscription_expires_at' => now()->addDay(),
'subscription_is_trial' => true,
'subscription_product_id' => 'monthly',
]);
Sanctum::actingAs($user);
@@ -113,7 +115,9 @@ it('analyzes a meal image into a draft', function () {
it('records a failed meal image analysis attempt', function () {
$user = User::factory()->create([
'trial_ends_at' => now()->addDay(),
'subscription_expires_at' => now()->addDay(),
'subscription_is_trial' => true,
'subscription_product_id' => 'monthly',
]);
Sanctum::actingAs($user);
@@ -147,9 +151,11 @@ it('records a failed meal image analysis attempt', function () {
});
it('requires a trial or subscription to analyze a meal image', function () {
it('requires an active subscription to analyze a meal image', function () {
$user = User::factory()->create([
'trial_ends_at' => now()->subDay(),
'subscription_expires_at' => now()->subDay(),
'subscription_is_trial' => true,
'subscription_product_id' => 'monthly',
]);
Sanctum::actingAs($user);
@@ -182,7 +188,9 @@ it('requires authentication to analyze a meal image', function () {
it('validates the analyzed image', function () {
Sanctum::actingAs(User::factory()->create([
'trial_ends_at' => now()->addDay(),
'subscription_expires_at' => now()->addDay(),
'subscription_is_trial' => true,
'subscription_product_id' => 'monthly',
]));
$this