482 lines
11 KiB
Go
Raw Normal View History

2018-03-27 23:32:49 +00:00
package routetests
2017-06-14 20:13:30 +00:00
2017-06-30 16:12:14 +00:00
var routeTests = map[string][]string{
2017-06-14 20:13:30 +00:00
// User
2017-06-21 18:33:57 +00:00
"/user/:nick": []string{
2017-06-14 20:13:30 +00:00
"/+Akyoto",
2017-06-21 18:33:57 +00:00
},
2017-06-14 20:13:30 +00:00
2018-04-19 15:48:15 +00:00
"/user/:nick/characters/liked": []string{
"/+Akyoto/characters/liked",
},
"/user/:nick/forum/threads": []string{
"/+Akyoto/forum/threads",
2017-06-21 18:33:57 +00:00
},
2017-06-14 20:13:30 +00:00
"/user/:nick/forum/posts": []string{
"/+Akyoto/forum/posts",
2017-06-23 15:15:48 +00:00
},
2018-03-14 10:57:40 +00:00
"/user/:nick/soundtracks/added": []string{
"/+Akyoto/soundtracks/added",
},
"/user/:nick/soundtracks/added/from/:index": []string{
"/+Akyoto/soundtracks/added/from/3",
},
2018-03-14 10:57:40 +00:00
"/user/:nick/soundtracks/liked": []string{
"/+Akyoto/soundtracks/liked",
2017-06-30 16:12:14 +00:00
},
"/user/:nick/soundtracks/liked/from/:index": []string{
"/+Akyoto/soundtracks/liked/from/3",
},
2018-03-19 11:25:31 +00:00
"/user/:nick/quotes/added": []string{
"/+Scott/quotes/added",
},
"/user/:nick/quotes/added/from/:index": []string{
"/+Scott/quotes/added/from/3",
},
"/user/:nick/quotes/liked": []string{
"/+Scott/quotes/liked",
},
"/user/:nick/quotes/liked/from/:index": []string{
"/+Scott/quotes/liked/from/3",
},
2017-10-01 05:24:56 +00:00
"/user/:nick/followers": []string{
"/+Akyoto/followers",
},
"/user/:nick/stats": []string{
"/+Akyoto/stats",
},
2017-07-05 19:23:59 +00:00
"/user/:nick/animelist/anime/:id": []string{
2018-04-04 19:35:29 +00:00
"/+Akyoto/animelist/anime/74y2cFiiR",
2017-06-21 18:33:57 +00:00
},
2017-06-20 12:16:23 +00:00
2017-07-05 19:23:59 +00:00
"/user/:nick/animelist/watching": []string{
"/+Akyoto/animelist/watching",
},
2018-03-23 03:12:06 +00:00
"/user/:nick/animelist/watching/from/:index": []string{
"/+Akyoto/animelist/watching/from/3",
},
2017-07-05 19:23:59 +00:00
"/user/:nick/animelist/completed": []string{
"/+Akyoto/animelist/completed",
},
2018-03-23 03:12:06 +00:00
"/user/:nick/animelist/completed/from/:index": []string{
"/+Akyoto/animelist/completed/from/3",
},
2017-07-05 19:23:59 +00:00
"/user/:nick/animelist/planned": []string{
"/+Akyoto/animelist/planned",
},
2018-03-23 03:12:06 +00:00
"/user/:nick/animelist/planned/from/:index": []string{
"/+Akyoto/animelist/planned/from/3",
},
2017-07-05 19:23:59 +00:00
"/user/:nick/animelist/hold": []string{
"/+Akyoto/animelist/hold",
},
2018-03-23 03:12:06 +00:00
"/user/:nick/animelist/hold/from/:index": []string{
"/+Akyoto/animelist/hold/from/3",
},
2017-07-05 19:23:59 +00:00
"/user/:nick/animelist/dropped": []string{
"/+Akyoto/animelist/dropped",
},
2018-03-23 03:12:06 +00:00
"/user/:nick/animelist/dropped/from/:index": []string{
"/+Akyoto/animelist/dropped/from/3",
},
2018-02-27 19:38:13 +00:00
"/user/:nick/recommended/anime": []string{
"/+Akyoto/recommended/anime",
},
2017-06-14 20:13:30 +00:00
// Pages
2017-06-21 18:33:57 +00:00
"/anime/:id": []string{
2018-04-04 19:35:29 +00:00
"/anime/74y2cFiiR",
2017-06-21 18:33:57 +00:00
},
2017-06-14 20:13:30 +00:00
2017-10-22 15:02:36 +00:00
"/anime/:id/characters": []string{
2018-04-04 19:35:29 +00:00
"/anime/74y2cFiiR/characters",
2017-10-22 15:02:36 +00:00
},
"/anime/:id/episodes": []string{
2018-04-04 19:35:29 +00:00
"/anime/74y2cFiiR/episodes",
2017-10-22 15:02:36 +00:00
},
"/anime/:id/tracks": []string{
2018-04-04 19:35:29 +00:00
"/anime/74y2cFiiR/tracks",
2017-10-22 15:02:36 +00:00
},
2018-04-25 18:23:35 +00:00
"/anime/:id/relations": []string{
"/anime/74y2cFiiR/relations",
},
"/thread/:id": []string{
"/thread/HJgS7c2K",
2017-06-21 18:33:57 +00:00
},
2017-06-14 20:13:30 +00:00
"/post/:id": []string{
"/post/B1RzshnK",
2017-06-21 18:33:57 +00:00
},
2017-06-14 20:13:30 +00:00
2017-06-21 18:33:57 +00:00
"/forum/:tag": []string{
2017-06-14 20:13:30 +00:00
"/forum/general",
2017-06-21 18:33:57 +00:00
},
2017-06-14 20:13:30 +00:00
2018-07-04 09:43:51 +00:00
"/genre/:name": []string{
"/genre/action",
},
"/company/:id": []string{
"/company/xCAUr7UkRaz",
},
"/company/:id/history": []string{
"/company/xCAUr7UkRaz/history",
},
"/companies/from/:index": []string{
"/companies/from/3",
},
"/explore/color/:color/anime": []string{
"/explore/color/hsl:0.050,0.25,0.5/anime",
},
"/explore/color/:color/anime/from/:index": []string{
"/explore/color/hsl:0.050,0.25,0.5/anime/from/3",
},
2017-06-21 18:33:57 +00:00
"/search/:term": []string{
2017-06-21 00:02:30 +00:00
"/search/Dragon Ball",
2017-06-21 18:33:57 +00:00
},
2017-06-21 00:02:30 +00:00
"/quote/:id": []string{
2018-02-26 11:48:25 +00:00
"/quote/gUZugd6zR",
},
"/quote/:id/edit": []string{
2018-02-26 11:48:25 +00:00
"/quote/gUZugd6zR/edit",
},
2018-04-25 18:23:35 +00:00
"/quote/:id/history": []string{
"/quote/gUZugd6zR/history",
},
"/quotes/from/:index": []string{
"/quotes/from/2",
},
"/quotes/best/from/:index": []string{
"/quotes/best/from/2",
},
2017-07-16 05:50:57 +00:00
"/soundtrack/:id": []string{
"/soundtrack/h0ac8sKkg",
2017-06-30 16:12:14 +00:00
},
2018-04-25 18:23:35 +00:00
"/soundtrack/:id/lyrics": []string{
"/soundtrack/vS64GbpzR/lyrics",
},
2017-10-22 15:02:36 +00:00
"/soundtrack/:id/edit": []string{
"/soundtrack/h0ac8sKkg/edit",
},
2018-03-23 03:12:06 +00:00
"/soundtrack/:id/history": []string{
"/soundtrack/h0ac8sKkg/history",
},
2018-03-23 03:12:06 +00:00
"/soundtracks": []string{
"/soundtracks",
},
2017-10-22 15:02:36 +00:00
"/soundtracks/from/:index": []string{
"/soundtracks/from/12",
},
2018-03-23 03:12:06 +00:00
"/soundtracks/best": []string{
"/soundtracks/best",
},
"/soundtracks/best/from/:index": []string{
"/soundtracks/best/from/12",
},
2018-03-23 03:12:06 +00:00
"/soundtracks/tag/:tag": []string{
"/soundtracks/tag/moe",
},
"/soundtracks/tag/:tag/from/:index": []string{
"/soundtracks/tag/moe/from/3",
},
2017-10-01 05:24:56 +00:00
"/character/:id": []string{
2018-04-11 10:05:02 +00:00
"/character/dfrNQrmmg-",
},
2018-04-11 21:11:33 +00:00
// "/kitsu/character/:id": []string{
// "/kitsu/character/6556",
// },
2018-04-11 10:05:02 +00:00
2018-04-11 21:11:33 +00:00
// "/mal/character/:id": []string{
// "/mal/character/498",
// },
2017-10-01 05:24:56 +00:00
2017-10-22 15:02:36 +00:00
"/compare/animelist/:nick-1/:nick-2": []string{
"/compare/animelist/Akyoto/Scott",
},
2018-04-13 16:07:21 +00:00
"/explore/anime/:year/:season/:status/:type": []string{
"/explore/anime/2011/any/finished/tv",
},
2018-04-25 18:23:35 +00:00
// AMV
"/amv/:id": []string{
"/amv/07scvSWmg",
},
"/amv/:id/edit": []string{
"/amv/07scvSWmg/edit",
},
"/amv/:id/history": []string{
"/amv/07scvSWmg/history",
},
// AMVs
"/amvs/from/:index": []string{
"/amvs/from/3",
},
"/amvs/best/from/:index": []string{
"/amvs/best/from/3",
},
2018-04-06 22:11:29 +00:00
// Redirects
"/mal/anime/:id": []string{
"/mal/anime/33352",
},
"/kitsu/anime/:id": []string{
"/kitsu/anime/12230",
},
"/anilist/anime/:id": []string{
"/anilist/anime/21827",
},
2017-06-14 20:13:30 +00:00
// API
2017-06-21 18:33:57 +00:00
"/api/anime/:id": []string{
2018-04-04 19:35:29 +00:00
"/api/anime/74y2cFiiR",
2017-06-21 18:33:57 +00:00
},
2017-06-14 20:13:30 +00:00
2017-06-21 18:33:57 +00:00
"/api/thread/:id": []string{
2017-06-14 20:13:30 +00:00
"/api/thread/HJgS7c2K",
2017-06-21 18:33:57 +00:00
},
2017-06-14 20:13:30 +00:00
2017-06-21 18:33:57 +00:00
"/api/post/:id": []string{
2017-06-14 20:13:30 +00:00
"/api/post/B1RzshnK",
2017-06-21 18:33:57 +00:00
},
2017-06-14 20:13:30 +00:00
2017-06-21 18:33:57 +00:00
"/api/animelist/:id": []string{
2017-06-14 20:13:30 +00:00
"/api/animelist/4J6qpK1ve",
2017-06-21 18:33:57 +00:00
},
2017-06-14 20:13:30 +00:00
2017-06-21 18:33:57 +00:00
"/api/settings/:id": []string{
2017-06-14 20:13:30 +00:00
"/api/settings/4J6qpK1ve",
2017-06-21 18:33:57 +00:00
},
2017-06-14 20:13:30 +00:00
2017-06-21 18:33:57 +00:00
"/api/user/:id": []string{
2017-06-14 20:13:30 +00:00
"/api/user/4J6qpK1ve",
2017-06-21 18:33:57 +00:00
},
2017-06-14 20:13:30 +00:00
2017-06-21 18:33:57 +00:00
"/api/googletouser/:id": []string{
2017-06-16 22:33:27 +00:00
"/api/googletouser/106530160120373282283",
2017-06-21 18:33:57 +00:00
},
2017-06-16 22:33:27 +00:00
2017-07-03 20:50:04 +00:00
"/api/facebooktouser/:id": []string{
"/api/facebooktouser/10207576239700188",
},
2017-06-21 18:33:57 +00:00
"/api/nicktouser/:id": []string{
2017-06-16 22:33:27 +00:00
"/api/nicktouser/Akyoto",
2017-06-21 18:33:57 +00:00
},
2017-06-16 22:33:27 +00:00
2017-06-30 16:12:14 +00:00
"/api/analytics/:id": []string{
"/api/analytics/4J6qpK1ve",
},
"/api/soundtrack/:id": []string{
"/api/soundtrack/h0ac8sKkg",
},
2017-10-01 05:24:56 +00:00
"/api/userfollows/:id": []string{
"/api/userfollows/4J6qpK1ve",
},
"/api/animecharacters/:id": []string{
2018-04-04 19:35:29 +00:00
"/api/animecharacters/74y2cFiiR",
2017-10-01 05:24:56 +00:00
},
2018-03-27 23:59:14 +00:00
"/api/animerelations/:id": []string{
2018-04-04 19:35:29 +00:00
"/api/animerelations/74y2cFiiR",
2018-03-27 23:59:14 +00:00
},
2017-10-01 05:24:56 +00:00
"/api/animeepisodes/:id": []string{
2018-04-04 19:35:29 +00:00
"/api/animeepisodes/74y2cFiiR",
2017-10-01 05:24:56 +00:00
},
2018-03-07 02:46:44 +00:00
"/anime/:id/episode/:episode-number": []string{
2018-04-04 19:35:29 +00:00
"/anime/74y2cFiiR/episode/5",
2018-03-07 02:46:44 +00:00
},
2018-04-25 18:23:35 +00:00
"/api/amv/:id": []string{
"/api/amv/07scvSWmg",
},
2017-10-01 05:24:56 +00:00
"/api/character/:id": []string{
2018-04-11 21:10:41 +00:00
"/api/character/dfrNQrmmg-",
2017-10-01 05:24:56 +00:00
},
2018-03-27 23:59:14 +00:00
"/api/company/:id": []string{
"/api/company/xCAUr7UkRaz",
},
"/api/draftindex/:id": []string{
"/api/draftindex/4J6qpK1ve",
},
"/api/inventory/:id": []string{
"/api/inventory/4J6qpK1ve",
2017-10-01 05:24:56 +00:00
},
2018-03-27 23:59:14 +00:00
"/api/shopitem/:id": []string{
"/api/shopitem/pro-account-3",
},
"/api/notification/:id": []string{
"/api/notification/u2WHJpkigm",
},
"/api/quote/:id": []string{
"/api/quote/GXp675zmR",
},
"/api/usernotifications/:id": []string{
"/api/usernotifications/4J6qpK1ve",
},
"/api/pushsubscriptions/:id": []string{
"/api/pushsubscriptions/4J6qpK1ve",
2017-10-01 05:24:56 +00:00
},
2017-06-16 22:33:27 +00:00
// Images
2018-04-14 11:53:18 +00:00
"/images/*file": []string{
"/images/elements/no-avatar.svg",
2017-06-21 18:33:57 +00:00
},
2017-06-14 20:13:30 +00:00
2017-10-03 02:24:01 +00:00
// Extra tests for higher coverage
"/_/+Akyoto": []string{
"/_/+Akyoto",
},
"/_/search/dragon": []string{
"/_/search/dragon",
},
2017-06-30 16:12:14 +00:00
// Disable these tests because they require authorization
2017-10-01 05:24:56 +00:00
"/auth/google": nil,
"/auth/google/callback": nil,
"/auth/facebook": nil,
"/auth/facebook/callback": nil,
2017-10-02 04:59:29 +00:00
"/dashboard": nil,
2017-10-01 05:24:56 +00:00
"/import": nil,
"/import/anilist/animelist": nil,
"/import/anilist/animelist/finish": nil,
"/import/myanimelist/animelist": nil,
"/import/myanimelist/animelist/finish": nil,
"/import/kitsu/animelist": nil,
"/import/kitsu/animelist/finish": nil,
2018-03-23 00:43:45 +00:00
"/animelist/watching": nil,
"/animelist/completed": nil,
"/animelist/planned": nil,
"/animelist/hold": nil,
"/animelist/dropped": nil,
2018-02-27 19:38:13 +00:00
"/notifications": nil,
"/user/:nick/notifications": nil,
2018-04-03 23:45:47 +00:00
"/user/:nick/edit": nil,
2018-04-11 21:10:41 +00:00
"/user/:nick/log": nil,
"/user/:nick/log/from/:index": nil,
2018-04-13 16:07:21 +00:00
"/editor/soundtracks/file": nil,
"/editor/soundtracks/links": nil,
"/editor/soundtracks/lyrics/missing": nil,
"/editor/soundtracks/lyrics/unaligned": nil,
2018-04-13 16:07:21 +00:00
"/editor/soundtracks/tags": nil,
2017-10-01 05:24:56 +00:00
"/api/test/notification": nil,
"/api/paypal/payment/create": nil,
2018-04-10 11:19:23 +00:00
"/api/emailtouser/:id": nil,
2017-10-01 05:24:56 +00:00
"/api/userfollows/:id/get/:item": nil,
"/api/userfollows/:id/get/:item/:property": nil,
"/api/pushsubscriptions/:id/get/:item": nil,
"/api/pushsubscriptions/:id/get/:item/:property": nil,
2018-02-28 23:06:03 +00:00
"/api/count/notifications/unseen": nil,
"/api/mark/notifications/seen": nil,
2018-03-23 00:43:45 +00:00
"/editor/kitsu/new/anime": nil,
2017-10-01 05:24:56 +00:00
"/paypal/success": nil,
"/paypal/cancel": nil,
"/anime/:id/edit": nil,
2018-04-25 18:23:35 +00:00
"/anime/:id/edit/images": nil,
"/anime/:id/edit/characters": nil,
"/anime/:id/edit/relations": nil,
"/anime/:id/edit/episodes": nil,
"/anime/:id/edit/history": nil,
2017-10-01 05:24:56 +00:00
"/new/thread": nil,
2018-07-04 09:43:51 +00:00
"/thread/:id/edit": nil,
"/post/:id/edit": nil,
"/company/:id/edit": nil,
2017-10-07 21:24:09 +00:00
"/admin/purchases": nil,
2018-04-17 23:08:04 +00:00
"/admin/registrations": nil,
2018-03-27 10:32:56 +00:00
"/explore/sequels": nil,
2017-10-06 20:07:12 +00:00
"/editor/anilist": nil,
"/editor/shoboi": nil,
2017-10-11 10:45:04 +00:00
"/dark-flame-master": nil,
2017-10-01 05:24:56 +00:00
"/user": nil,
"/settings": nil,
2017-11-05 07:16:20 +00:00
"/settings/accounts": nil,
"/settings/notifications": nil,
"/settings/apps": nil,
"/settings/avatar": nil,
"/settings/formatting": nil,
"/settings/pro": nil,
2017-10-04 06:12:12 +00:00
"/shop": nil,
2017-10-06 10:44:55 +00:00
"/shop/history": nil,
2018-03-04 15:53:42 +00:00
"/support": nil,
2017-10-04 06:12:12 +00:00
"/charge": nil,
2018-03-09 18:53:21 +00:00
"/log": nil,
2018-07-04 09:43:51 +00:00
"/log/from/:index": nil,
2017-10-04 06:12:12 +00:00
"/inventory": nil,
2017-10-01 05:24:56 +00:00
"/extension/embed": nil,
2017-06-21 18:33:57 +00:00
}
2018-03-27 23:32:49 +00:00
// All returns which specific routes to test for a given generic route.
func All() map[string][]string {
return routeTests
}