added subscription demo generators

This commit is contained in:
Čarodej
2022-01-10 16:29:44 +01:00
parent 08139c8f96
commit ca48d430bb
9 changed files with 569 additions and 34 deletions

View File

@@ -1,5 +1,4 @@
<?php
namespace Tests\App\Socialite;
use Mockery;
@@ -81,7 +80,7 @@ class SocialiteTest extends TestCase
collect(config('vuefilemanager.avatar_sizes'))
->each(
fn($size) => Storage::disk('local')
fn ($size) => Storage::disk('local')
->assertExists("avatars/{$size['name']}-{$user->settings->getRawOriginal('avatar')}")
);
}

View File

@@ -1,4 +1,5 @@
<?php
namespace Tests\Support\Scheduler;
use Storage;
@@ -61,6 +62,7 @@ class SchedulerTest extends TestCase
->create([
'user_id' => $user->id,
'download' => 155000000,
'upload' => 255000000,
'created_at' => now()->subDay(),
]);
@@ -70,12 +72,12 @@ class SchedulerTest extends TestCase
->assertDatabaseHas('usages', [
'metered_feature_id' => $plan->meteredFeatures()->get()[0]->id,
'subscription_id' => $subscription->id,
'quantity' => 0.125,
'quantity' => 125,
])
->assertDatabaseHas('usages', [
'metered_feature_id' => $plan->meteredFeatures()->get()[1]->id,
'subscription_id' => $subscription->id,
'quantity' => 0.155,
'quantity' => 410,
]);
}