Add test for song info

This commit is contained in:
An Phan 2016-05-27 16:34:38 +08:00
parent 291f9e361d
commit efe8b937d2

View file

@ -300,4 +300,19 @@ class SongTest extends TestCase
'lyrics' => 'Thor! Nanananananana Batman.', // haha
]);
}
public function testGetSongInfo()
{
$this->createSampleMediaSet();
$song = Song::first();
$this->actingAs(factory(User::class, 'admin')->create())
->get("/api/{$song->id}/info")
->seeStatusCode(200)
->seeJson([
'lyrics' => $song->lyrics,
'artist_info' => false,
'album_info' => false,
]);
}
}