mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
add Club tests #50
This commit is contained in:
parent
252671cf7d
commit
8557a43a5f
77
tests/Http/Controllers/ClubControllerTest.php
Normal file
77
tests/Http/Controllers/ClubControllerTest.php
Normal file
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
class ClubControllerTest extends TestCase
|
||||
{
|
||||
public function testMain()
|
||||
{
|
||||
$this->get('/v3/club/1')
|
||||
->seeStatusCode(200)
|
||||
->seeJsonStructure([
|
||||
'mal_id',
|
||||
'url',
|
||||
'image_url',
|
||||
'title',
|
||||
'members_count',
|
||||
'pictures_count',
|
||||
'category',
|
||||
'created',
|
||||
'type',
|
||||
'staff' => [
|
||||
[
|
||||
'mal_id',
|
||||
'type',
|
||||
'name',
|
||||
'url',
|
||||
]
|
||||
],
|
||||
'anime_relations' => [
|
||||
[
|
||||
'mal_id',
|
||||
'type',
|
||||
'name',
|
||||
'url',
|
||||
]
|
||||
],
|
||||
'manga_relations' => [
|
||||
[
|
||||
'mal_id',
|
||||
'type',
|
||||
'name',
|
||||
'url',
|
||||
]
|
||||
],
|
||||
'character_relations' => [
|
||||
[
|
||||
'mal_id',
|
||||
'type',
|
||||
'name',
|
||||
'url',
|
||||
]
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
public function testMembers()
|
||||
{
|
||||
$this->get('/v3/club/1/members')
|
||||
->seeStatusCode(200)
|
||||
->seeJsonStructure([
|
||||
'members' => [
|
||||
[
|
||||
'username',
|
||||
'url',
|
||||
'image_url'
|
||||
]
|
||||
]
|
||||
]);
|
||||
|
||||
$this->get('/v3/club/1/members/1000')
|
||||
->seeStatusCode(404);
|
||||
}
|
||||
|
||||
public function test404()
|
||||
{
|
||||
$this->get('/v3/club/1000000')
|
||||
->seeStatusCode(404);
|
||||
}
|
||||
}
|
1
tests/Http/Controllers/GenreControllerTest.php
Normal file
1
tests/Http/Controllers/GenreControllerTest.php
Normal file
@ -0,0 +1 @@
|
||||
<?php
|
Loading…
x
Reference in New Issue
Block a user