mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 03:04:05 +00:00
(switch from S3 to public driver for easier local demos)
This commit is contained in:
@@ -56,7 +56,7 @@ class ConcertsController extends Controller
|
|||||||
'zip' => request('zip'),
|
'zip' => request('zip'),
|
||||||
'ticket_price' => request('ticket_price') * 100,
|
'ticket_price' => request('ticket_price') * 100,
|
||||||
'ticket_quantity' => (int) request('ticket_quantity'),
|
'ticket_quantity' => (int) request('ticket_quantity'),
|
||||||
'poster_image_path' => request('poster_image', new NullFile)->store('posters', 's3'),
|
'poster_image_path' => request('poster_image', new NullFile)->store('posters', 'public'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return redirect()->route('backstage.concerts.index');
|
return redirect()->route('backstage.concerts.index');
|
||||||
|
|||||||
@@ -375,7 +375,7 @@ class AddConcertTest extends TestCase
|
|||||||
{
|
{
|
||||||
$this->disableExceptionHandling();
|
$this->disableExceptionHandling();
|
||||||
|
|
||||||
Storage::fake('s3');
|
Storage::fake('public');
|
||||||
$user = factory(User::class)->create();
|
$user = factory(User::class)->create();
|
||||||
$file = File::image('concert-poster.png', 850, 1100);
|
$file = File::image('concert-poster.png', 850, 1100);
|
||||||
|
|
||||||
@@ -385,10 +385,10 @@ class AddConcertTest extends TestCase
|
|||||||
|
|
||||||
tap(Concert::first(), function ($concert) use ($file) {
|
tap(Concert::first(), function ($concert) use ($file) {
|
||||||
$this->assertNotNull($concert->poster_image_path);
|
$this->assertNotNull($concert->poster_image_path);
|
||||||
Storage::disk('s3')->assertExists($concert->poster_image_path);
|
Storage::disk('public')->assertExists($concert->poster_image_path);
|
||||||
$this->assertFileEquals(
|
$this->assertFileEquals(
|
||||||
$file->getPathname(),
|
$file->getPathname(),
|
||||||
Storage::disk('s3')->path($concert->poster_image_path)
|
Storage::disk('public')->path($concert->poster_image_path)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -396,7 +396,7 @@ class AddConcertTest extends TestCase
|
|||||||
/** @test */
|
/** @test */
|
||||||
function poster_image_must_be_an_image()
|
function poster_image_must_be_an_image()
|
||||||
{
|
{
|
||||||
Storage::fake('s3');
|
Storage::fake('public');
|
||||||
$user = factory(User::class)->create();
|
$user = factory(User::class)->create();
|
||||||
$file = File::create('not-a-poster.pdf');
|
$file = File::create('not-a-poster.pdf');
|
||||||
|
|
||||||
@@ -412,7 +412,7 @@ class AddConcertTest extends TestCase
|
|||||||
/** @test */
|
/** @test */
|
||||||
function poster_image_must_be_at_least_400px_wide()
|
function poster_image_must_be_at_least_400px_wide()
|
||||||
{
|
{
|
||||||
Storage::fake('s3');
|
Storage::fake('public');
|
||||||
$user = factory(User::class)->create();
|
$user = factory(User::class)->create();
|
||||||
$file = File::image('poster.png', 399, 516);
|
$file = File::image('poster.png', 399, 516);
|
||||||
|
|
||||||
@@ -428,7 +428,7 @@ class AddConcertTest extends TestCase
|
|||||||
/** @test */
|
/** @test */
|
||||||
function poster_image_must_have_letter_aspect_ratio()
|
function poster_image_must_have_letter_aspect_ratio()
|
||||||
{
|
{
|
||||||
Storage::fake('s3');
|
Storage::fake('public');
|
||||||
$user = factory(User::class)->create();
|
$user = factory(User::class)->create();
|
||||||
$file = File::image('poster.png', 851, 1100);
|
$file = File::image('poster.png', 851, 1100);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user