2017-06-14 20:13:30 +00:00
|
|
|
package main
|
|
|
|
|
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
|
|
|
|
2017-11-17 10:00:49 +00:00
|
|
|
"/user/:nick/forum/threads": []string{
|
|
|
|
"/+Akyoto/forum/threads",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-14 20:13:30 +00:00
|
|
|
|
2017-11-17 10:00:49 +00:00
|
|
|
"/user/:nick/forum/posts": []string{
|
|
|
|
"/+Akyoto/forum/posts",
|
2017-06-23 15:15:48 +00:00
|
|
|
},
|
|
|
|
|
2017-07-16 05:50:57 +00:00
|
|
|
"/user/:nick/soundtracks": []string{
|
|
|
|
"/+Akyoto/soundtracks",
|
2017-06-30 16:12:14 +00:00
|
|
|
},
|
|
|
|
|
2017-10-01 05:24:56 +00:00
|
|
|
"/user/:nick/followers": []string{
|
|
|
|
"/+Akyoto/followers",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/user/:nick/stats": []string{
|
|
|
|
"/+Akyoto/stats",
|
|
|
|
},
|
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/user/:nick/animelist": []string{
|
2017-06-20 12:16:23 +00:00
|
|
|
"/+Akyoto/animelist",
|
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/anime/:id": []string{
|
2017-10-02 00:06:59 +00:00
|
|
|
"/+Akyoto/animelist/anime/7929",
|
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",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/user/:nick/animelist/completed": []string{
|
|
|
|
"/+Akyoto/animelist/completed",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/user/:nick/animelist/planned": []string{
|
|
|
|
"/+Akyoto/animelist/planned",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/user/:nick/animelist/hold": []string{
|
|
|
|
"/+Akyoto/animelist/hold",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/user/:nick/animelist/dropped": []string{
|
|
|
|
"/+Akyoto/animelist/dropped",
|
|
|
|
},
|
|
|
|
|
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{
|
2017-06-14 20:13:30 +00:00
|
|
|
"/anime/1",
|
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{
|
|
|
|
"/anime/1/characters",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/anime/:id/episodes": []string{
|
|
|
|
"/anime/1/episodes",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/anime/:id/tracks": []string{
|
|
|
|
"/anime/1/tracks",
|
|
|
|
},
|
|
|
|
|
2017-07-10 14:58:34 +00:00
|
|
|
"/thread/:id": []string{
|
|
|
|
"/thread/HJgS7c2K",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-14 20:13:30 +00:00
|
|
|
|
2017-07-10 14:58:34 +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
|
|
|
|
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
|
|
|
|
2018-01-25 14:29:52 +00:00
|
|
|
"/quote/:id": []string{
|
2018-02-26 11:48:25 +00:00
|
|
|
"/quote/gUZugd6zR",
|
2018-01-25 14:29:52 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
"/quote/:id/edit": []string{
|
2018-02-26 11:48:25 +00:00
|
|
|
"/quote/gUZugd6zR/edit",
|
2018-01-25 14:29:52 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
"/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
|
|
|
},
|
|
|
|
|
2017-10-22 15:02:36 +00:00
|
|
|
"/soundtrack/:id/edit": []string{
|
|
|
|
"/soundtrack/h0ac8sKkg/edit",
|
|
|
|
},
|
|
|
|
|
2018-01-25 14:29:52 +00:00
|
|
|
"/soundtracks": []string{
|
|
|
|
"/soundtracks",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/soundtracks/best": []string{
|
|
|
|
"/soundtracks/best",
|
|
|
|
},
|
|
|
|
|
2017-10-22 15:02:36 +00:00
|
|
|
"/soundtracks/from/:index": []string{
|
|
|
|
"/soundtracks/from/12",
|
|
|
|
},
|
|
|
|
|
2018-01-25 14:29:52 +00:00
|
|
|
"/soundtracks/best/from/:index": []string{
|
|
|
|
"/soundtracks/best/from/12",
|
|
|
|
},
|
|
|
|
|
2017-10-01 05:24:56 +00:00
|
|
|
"/character/:id": []string{
|
|
|
|
"/character/6556",
|
|
|
|
},
|
|
|
|
|
2017-10-22 15:02:36 +00:00
|
|
|
"/compare/animelist/:nick-1/:nick-2": []string{
|
|
|
|
"/compare/animelist/Akyoto/Scott",
|
|
|
|
},
|
|
|
|
|
2017-11-17 10:00:49 +00:00
|
|
|
"/explore/anime/:year/:status/:type": []string{
|
|
|
|
"/explore/anime/2011/finished/tv",
|
|
|
|
},
|
|
|
|
|
2017-06-14 20:13:30 +00:00
|
|
|
// API
|
2017-06-21 18:33:57 +00:00
|
|
|
"/api/anime/:id": []string{
|
2017-06-14 20:13:30 +00:00
|
|
|
"/api/anime/1",
|
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/emailtouser/:id": []string{
|
2017-06-16 22:33:27 +00:00
|
|
|
"/api/emailtouser/e.urbach@gmail.com",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-16 22:33:27 +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/anilisttoanime/:id": []string{
|
|
|
|
"/api/anilisttoanime/527",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/api/animecharacters/:id": []string{
|
|
|
|
"/api/animecharacters/323",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/api/animeepisodes/:id": []string{
|
|
|
|
"/api/animeepisodes/323",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/api/character/:id": []string{
|
|
|
|
"/api/character/6556",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/api/pushsubscriptions/:id": []string{
|
|
|
|
"/api/pushsubscriptions/4J6qpK1ve",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/api/myanimelisttoanime/:id": []string{
|
|
|
|
"/api/myanimelisttoanime/527",
|
|
|
|
},
|
|
|
|
|
2017-06-16 22:33:27 +00:00
|
|
|
// Images
|
2017-06-21 18:33:57 +00:00
|
|
|
"/images/avatars/large/:file": []string{
|
2017-06-18 12:52:50 +00:00
|
|
|
"/images/avatars/large/4J6qpK1ve.webp",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-18 12:52:50 +00:00
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/images/avatars/small/:file": []string{
|
2017-06-18 12:52:50 +00:00
|
|
|
"/images/avatars/small/4J6qpK1ve.webp",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-18 12:52:50 +00:00
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/images/brand/:file": []string{
|
2017-06-18 12:52:50 +00:00
|
|
|
"/images/brand/64.webp",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-16 22:33:27 +00:00
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/images/login/:file": []string{
|
2017-06-16 22:33:27 +00:00
|
|
|
"/images/login/google",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-16 22:33:27 +00:00
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/images/cover/:file": []string{
|
2017-06-14 20:13:30 +00:00
|
|
|
"/images/cover/default",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-14 20:13:30 +00:00
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/images/elements/:file": []string{
|
2017-06-18 12:07:38 +00:00
|
|
|
"/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-02-27 19:38:13 +00:00
|
|
|
"/notifications": nil,
|
2018-03-01 21:52:01 +00:00
|
|
|
"/user/:nick/notifications": nil,
|
2017-10-01 05:24:56 +00:00
|
|
|
"/api/test/notification": nil,
|
|
|
|
"/api/paypal/payment/create": nil,
|
|
|
|
"/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,
|
2017-10-01 05:24:56 +00:00
|
|
|
"/paypal/success": nil,
|
|
|
|
"/paypal/cancel": nil,
|
|
|
|
"/anime/:id/edit": nil,
|
|
|
|
"/new/thread": nil,
|
2017-10-07 21:24:09 +00:00
|
|
|
"/admin/purchases": 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,
|
|
|
|
"/inventory": nil,
|
2017-10-01 05:24:56 +00:00
|
|
|
"/extension/embed": nil,
|
2017-06-21 18:33:57 +00:00
|
|
|
}
|