From 2405d00cff6526079244e7025057dab888753a41 Mon Sep 17 00:00:00 2001 From: Mattia Basone Date: Wed, 9 Sep 2020 18:32:58 +0200 Subject: [PATCH] adds skin tests --- tests/Http/Controllers/ApiControllerTest.php | 52 ++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/tests/Http/Controllers/ApiControllerTest.php b/tests/Http/Controllers/ApiControllerTest.php index fa754d4..1ca6738 100644 --- a/tests/Http/Controllers/ApiControllerTest.php +++ b/tests/Http/Controllers/ApiControllerTest.php @@ -46,6 +46,58 @@ public function shouldReturnUserAvatarWithSize(): void ); } + /** + * @test + */ + public function shouldReturnUserSkinWithoutSize(): void + { + $this->get('/skin/_Cyb3r'); + $this->assertResponseOk(); + $this->assertEquals( + 'image/png', + $this->response->headers->get('Content-Type') + ); + } + + /** + * @test + */ + public function shouldReturnUserSkinBackWithoutSize(): void + { + $this->get('/skin-back/_Cyb3r'); + $this->assertResponseOk(); + $this->assertEquals( + 'image/png', + $this->response->headers->get('Content-Type') + ); + } + + /** + * @test + */ + public function shouldReturnUserSkinWithSize(): void + { + $this->get('/skin/200/_Cyb3r'); + $this->assertResponseOk(); + $this->assertEquals( + 'image/png', + $this->response->headers->get('Content-Type') + ); + } + + /** + * @test + */ + public function shouldReturnUserSkinBackWithSize(): void + { + $this->get('/skin-back/200/_Cyb3r'); + $this->assertResponseOk(); + $this->assertEquals( + 'image/png', + $this->response->headers->get('Content-Type') + ); + } + /** * @test */