From 53c4bedf7b2c30c9fd3f7f8855d7427b98b4ae07 Mon Sep 17 00:00:00 2001 From: Phan An Date: Sat, 10 Jun 2017 16:17:34 +0100 Subject: [PATCH] Remove Feature test for Artist, as it actually is Unit --- app/Models/Artist.php | 1 - tests/Unit/ArtistTest.php | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/Models/Artist.php b/app/Models/Artist.php index 67ad43d2..75bbca42 100644 --- a/app/Models/Artist.php +++ b/app/Models/Artist.php @@ -121,7 +121,6 @@ class Artist extends Model return $info; } - /** * Write an artist image file with binary data and update the Artist with the new cover file. * diff --git a/tests/Unit/ArtistTest.php b/tests/Unit/ArtistTest.php index 6219a3f2..df79d06a 100644 --- a/tests/Unit/ArtistTest.php +++ b/tests/Unit/ArtistTest.php @@ -109,4 +109,19 @@ class ArtistTest extends TestCase // Then I receive the extra info $this->assertEquals(['foo' => 'bar'], $info); } + + /** @test */ + public function artists_with_name_in_utf16_encoding_are_retrieved_correctly() + { + // Given there's an artist with name in UTF-16 encoding + $name = file_get_contents(__DIR__.'../../blobs/utf16'); + $artist = Artist::get($name); + + // When I get the artist using the name + $retrieved = Artist::get($name); + + // Then I receive the artist + $this->assertEquals($artist->id, $retrieved->id); + + } }