mirror of
https://github.com/koel/koel
synced 2024-11-10 06:34:14 +00:00
Add test for song info
This commit is contained in:
parent
291f9e361d
commit
efe8b937d2
1 changed files with 15 additions and 0 deletions
|
@ -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,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue