Setup CloudConvert to take webpage screenshots

This commit is contained in:
Jonny Barnes 2023-01-02 09:39:23 +00:00
parent 0d393bd172
commit 45c71bbb47
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
7 changed files with 177 additions and 38 deletions

View file

@ -0,0 +1,22 @@
<?php
namespace Tests\Feature\Jobs;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
class SaveScreenshotTest extends TestCase
{
/**
* A basic feature test example.
*
* @return void
*/
public function test_example()
{
$response = $this->get('/');
$response->assertStatus(200);
}
}

View file

@ -85,14 +85,15 @@ class ArticlesTest extends TestCase
public function dateScopeReturnsExpectedArticlesForDecember(): void
{
Article::factory()->create([
'created_at' => Carbon::now()->setMonth(11)->toDateTimeString(),
'updated_at' => Carbon::now()->setMonth(11)->toDateTimeString(),
'created_at' => Carbon::now()->setDay(11)->setMonth(11)->toDateTimeString(),
'updated_at' => Carbon::now()->setDay(11)->setMonth(11)->toDateTimeString(),
]);
Article::factory()->create([
'created_at' => Carbon::now()->setMonth(12)->toDateTimeString(),
'updated_at' => Carbon::now()->setMonth(12)->toDateTimeString(),
'created_at' => Carbon::now()->setMonth(12)->setDay(12)->toDateTimeString(),
'updated_at' => Carbon::now()->setMonth(12)->setDay(12)->toDateTimeString(),
]);
$this->assertCount(1, Article::date(date('Y'), 12)->get());
}
}