mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
fix tests
This commit is contained in:
parent
deb8e9470c
commit
c6d600675b
@ -123,8 +123,7 @@ class AnimeControllerV4Test extends TestCase
|
||||
'url',
|
||||
'images' => [
|
||||
'jpg' => [
|
||||
'image_url',
|
||||
'small_image_url',
|
||||
'image_url'
|
||||
],
|
||||
'webp' => [
|
||||
'image_url',
|
||||
@ -189,6 +188,7 @@ class AnimeControllerV4Test extends TestCase
|
||||
'title_japanese',
|
||||
'title_romanji',
|
||||
'aired',
|
||||
'score',
|
||||
'filler',
|
||||
'recap',
|
||||
'forum_url'
|
||||
@ -211,20 +211,13 @@ class AnimeControllerV4Test extends TestCase
|
||||
'title_japanese',
|
||||
'title_romanji',
|
||||
'aired',
|
||||
'score',
|
||||
'filler',
|
||||
'recap',
|
||||
'forum_url'
|
||||
]
|
||||
]
|
||||
])
|
||||
->seeJsonContains([
|
||||
'data' => [
|
||||
[
|
||||
'mal_id' => 101,
|
||||
'title' => 'Showdown in a Heat Haze! Ace vs. the Gallant Scorpion!'
|
||||
]
|
||||
]
|
||||
]);;
|
||||
]);
|
||||
}
|
||||
|
||||
public function testEpisode()
|
||||
@ -415,14 +408,6 @@ class AnimeControllerV4Test extends TestCase
|
||||
'is_spoiler',
|
||||
'is_preliminary',
|
||||
'episodes_watched',
|
||||
'scores' => [
|
||||
'overall',
|
||||
'story',
|
||||
'animation',
|
||||
'sound',
|
||||
'character',
|
||||
'enjoyment'
|
||||
],
|
||||
'user' => [
|
||||
'url',
|
||||
'username',
|
||||
@ -440,7 +425,7 @@ class AnimeControllerV4Test extends TestCase
|
||||
]);
|
||||
|
||||
$this->get('/v4/anime/1/reviews?page=100')
|
||||
->seeStatusCode(200)
|
||||
->seeStatusCode(404)
|
||||
->seeJsonStructure([
|
||||
'pagination' => [
|
||||
'last_visible_page',
|
||||
|
@ -93,8 +93,7 @@ class MangaControllerV4Test extends TestCase
|
||||
'url',
|
||||
'images' => [
|
||||
'jpg' => [
|
||||
'image_url',
|
||||
'small_image_url',
|
||||
'image_url'
|
||||
],
|
||||
'webp' => [
|
||||
'image_url',
|
||||
@ -237,13 +236,6 @@ class MangaControllerV4Test extends TestCase
|
||||
'is_spoiler',
|
||||
'is_preliminary',
|
||||
'chapters_read',
|
||||
'scores' => [
|
||||
'overall',
|
||||
'story',
|
||||
'art',
|
||||
'character',
|
||||
'enjoyment'
|
||||
],
|
||||
'user' => [
|
||||
'url',
|
||||
'username',
|
||||
@ -261,7 +253,7 @@ class MangaControllerV4Test extends TestCase
|
||||
]);
|
||||
|
||||
$this->get('/v4/manga/1/reviews?page=100')
|
||||
->seeStatusCode(200)
|
||||
->seeStatusCode(404)
|
||||
->seeJsonStructure([
|
||||
'pagination' => [
|
||||
'last_visible_page',
|
||||
|
@ -10,8 +10,13 @@ class ProducerControllerTest extends TestCase
|
||||
->seeJsonStructure(['data'=>[
|
||||
[
|
||||
'mal_id',
|
||||
'name',
|
||||
'url',
|
||||
'titles',
|
||||
'images',
|
||||
'count',
|
||||
'favorites',
|
||||
'established',
|
||||
'about',
|
||||
'count'
|
||||
]
|
||||
]]);
|
||||
|
@ -6,49 +6,82 @@ class ScheduleControllerTest extends TestCase
|
||||
{
|
||||
$this->get('/v4/schedules')
|
||||
->seeStatusCode(200)
|
||||
->seeJsonStructure([
|
||||
'monday' => [
|
||||
[
|
||||
'mal_id',
|
||||
'url',
|
||||
'title',
|
||||
'synopsis',
|
||||
'type',
|
||||
'airing_start',
|
||||
'episodes',
|
||||
'members',
|
||||
'genres' => [
|
||||
[
|
||||
'mal_id',
|
||||
'type',
|
||||
'name',
|
||||
'url'
|
||||
]
|
||||
],
|
||||
'source',
|
||||
'producers' => [
|
||||
[
|
||||
'mal_id',
|
||||
'type',
|
||||
'name',
|
||||
'url'
|
||||
]
|
||||
],
|
||||
'score',
|
||||
'licensors',
|
||||
'r18',
|
||||
'kids'
|
||||
->seeJsonStructure(['data' => [
|
||||
'mal_id',
|
||||
'url',
|
||||
'images' => [
|
||||
'jpg' => [
|
||||
'image_url',
|
||||
'small_image_url',
|
||||
'large_image_url'
|
||||
],
|
||||
'webp' => [
|
||||
'image_url',
|
||||
'small_image_url',
|
||||
'large_image_url'
|
||||
],
|
||||
],
|
||||
'trailer' => [
|
||||
'youtube_id',
|
||||
'url',
|
||||
'embed_url',
|
||||
'images' => [
|
||||
'image_url',
|
||||
'small_image_url',
|
||||
'medium_image_url',
|
||||
'large_image_url',
|
||||
'maximum_image_url',
|
||||
]
|
||||
],
|
||||
'tuesday',
|
||||
'wednesday',
|
||||
'thursday',
|
||||
'friday',
|
||||
'saturday',
|
||||
'sunday',
|
||||
'other',
|
||||
'unknown'
|
||||
]);
|
||||
'title',
|
||||
'title_english',
|
||||
'title_japanese',
|
||||
'title_synonyms',
|
||||
'type',
|
||||
'source',
|
||||
'episodes',
|
||||
'status',
|
||||
'airing',
|
||||
'aired' => [
|
||||
'from',
|
||||
'to',
|
||||
'prop' => [
|
||||
'from' => [
|
||||
'day',
|
||||
'month',
|
||||
'year'
|
||||
],
|
||||
'to' => [
|
||||
'day',
|
||||
'month',
|
||||
'year'
|
||||
]
|
||||
],
|
||||
'string'
|
||||
],
|
||||
'duration',
|
||||
'rating',
|
||||
'score',
|
||||
'scored_by',
|
||||
'rank',
|
||||
'popularity',
|
||||
'members',
|
||||
'favorites',
|
||||
'synopsis',
|
||||
'background',
|
||||
'season',
|
||||
'year',
|
||||
'broadcast' => [
|
||||
'day',
|
||||
'time',
|
||||
'timezone',
|
||||
'string'
|
||||
],
|
||||
'producers',
|
||||
'licensors',
|
||||
'studios',
|
||||
'genres',
|
||||
]]);
|
||||
}
|
||||
|
||||
public function test400()
|
||||
|
@ -306,12 +306,6 @@ class UserControllerTest extends TestCase
|
||||
->seeStatusCode(200);
|
||||
}
|
||||
|
||||
public function testUserPrivateList()
|
||||
{
|
||||
$this->get('/v4/users/nekomata1037/mangalist?order_by=last_updated&sort=descending')
|
||||
->seeStatusCode(400);
|
||||
}
|
||||
|
||||
public function testUserClubs()
|
||||
{
|
||||
$this->get('/v4/users/nekomata1037/clubs')
|
||||
|
Loading…
x
Reference in New Issue
Block a user