mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
add case sensitive default URL tests, so 06caf589abfc4f7a552714558ac5f78abddeeabb won't happen again
This commit is contained in:
parent
06caf589ab
commit
7714e0e0ef
64
test/test.js
64
test/test.js
@ -362,9 +362,9 @@ describe("Crafatar", function() {
|
|||||||
redirect: "/avatars/853c80ef3c3749fdaa49938b674adae6?size=16"
|
redirect: "/avatars/853c80ef3c3749fdaa49938b674adae6?size=16"
|
||||||
},
|
},
|
||||||
"avatar with non-existent username defaulting to url": {
|
"avatar with non-existent username defaulting to url": {
|
||||||
url: "http://localhost:3000/avatars/0?size=16&default=http%3A%2F%2Fexample.com",
|
url: "http://localhost:3000/avatars/0?size=16&default=http%3A%2F%2Fexample.com%2FCaseSensitive",
|
||||||
crc32: 0,
|
crc32: 0,
|
||||||
redirect: "http://example.com"
|
redirect: "http://example.com/CaseSensitive"
|
||||||
},
|
},
|
||||||
"helm avatar with existing username": {
|
"helm avatar with existing username": {
|
||||||
url: "http://localhost:3000/avatars/jeb_?size=16&helm",
|
url: "http://localhost:3000/avatars/jeb_?size=16&helm",
|
||||||
@ -392,9 +392,9 @@ describe("Crafatar", function() {
|
|||||||
redirect: "/avatars/853c80ef3c3749fdaa49938b674adae6?size=16&helm="
|
redirect: "/avatars/853c80ef3c3749fdaa49938b674adae6?size=16&helm="
|
||||||
},
|
},
|
||||||
"helm avatar with non-existent username defaulting to url": {
|
"helm avatar with non-existent username defaulting to url": {
|
||||||
url: "http://localhost:3000/avatars/0?size=16&helm&default=http%3A%2F%2Fexample.com",
|
url: "http://localhost:3000/avatars/0?size=16&helm&default=http%3A%2F%2Fexample.com%2FCaseSensitive",
|
||||||
crc32: 0,
|
crc32: 0,
|
||||||
redirect: "http://example.com"
|
redirect: "http://example.com/CaseSensitive"
|
||||||
},
|
},
|
||||||
"avatar with existing uuid": {
|
"avatar with existing uuid": {
|
||||||
url: "http://localhost:3000/avatars/853c80ef3c3749fdaa49938b674adae6?size=16",
|
url: "http://localhost:3000/avatars/853c80ef3c3749fdaa49938b674adae6?size=16",
|
||||||
@ -422,9 +422,9 @@ describe("Crafatar", function() {
|
|||||||
redirect: "/avatars/853c80ef3c3749fdaa49938b674adae6?size=16"
|
redirect: "/avatars/853c80ef3c3749fdaa49938b674adae6?size=16"
|
||||||
},
|
},
|
||||||
"avatar with non-existent uuid defaulting to url": {
|
"avatar with non-existent uuid defaulting to url": {
|
||||||
url: "http://localhost:3000/avatars/00000000000000000000000000000000?size=16&default=http%3A%2F%2Fexample.com",
|
url: "http://localhost:3000/avatars/00000000000000000000000000000000?size=16&default=http%3A%2F%2Fexample.com%2FCaseSensitive",
|
||||||
crc32: 0,
|
crc32: 0,
|
||||||
redirect: "http://example.com"
|
redirect: "http://example.com/CaseSensitive"
|
||||||
},
|
},
|
||||||
"helm avatar with existing uuid": {
|
"helm avatar with existing uuid": {
|
||||||
url: "http://localhost:3000/avatars/853c80ef3c3749fdaa49938b674adae6?size=16&helm",
|
url: "http://localhost:3000/avatars/853c80ef3c3749fdaa49938b674adae6?size=16&helm",
|
||||||
@ -452,9 +452,9 @@ describe("Crafatar", function() {
|
|||||||
redirect: "/avatars/853c80ef3c3749fdaa49938b674adae6?size=16"
|
redirect: "/avatars/853c80ef3c3749fdaa49938b674adae6?size=16"
|
||||||
},
|
},
|
||||||
"helm avatar with non-existent uuid defaulting to url": {
|
"helm avatar with non-existent uuid defaulting to url": {
|
||||||
url: "http://localhost:3000/avatars/00000000000000000000000000000000?size=16&helm&default=http%3A%2F%2Fexample.com",
|
url: "http://localhost:3000/avatars/00000000000000000000000000000000?size=16&helm&default=http%3A%2F%2Fexample.com%2FCaseSensitive",
|
||||||
crc32: 0,
|
crc32: 0,
|
||||||
redirect: "http://example.com"
|
redirect: "http://example.com/CaseSensitive"
|
||||||
},
|
},
|
||||||
"cape with existing username": {
|
"cape with existing username": {
|
||||||
url: "http://localhost:3000/capes/jeb_",
|
url: "http://localhost:3000/capes/jeb_",
|
||||||
@ -466,9 +466,9 @@ describe("Crafatar", function() {
|
|||||||
crc32: 0
|
crc32: 0
|
||||||
},
|
},
|
||||||
"cape with non-existent username defaulting to url": {
|
"cape with non-existent username defaulting to url": {
|
||||||
url: "http://localhost:3000/capes/0?default=http%3A%2F%2Fexample.com",
|
url: "http://localhost:3000/capes/0?default=http%3A%2F%2Fexample.com%2FCaseSensitive",
|
||||||
crc32: 0,
|
crc32: 0,
|
||||||
redirect: "http://example.com"
|
redirect: "http://example.com/CaseSensitive"
|
||||||
},
|
},
|
||||||
"cape with existing uuid": {
|
"cape with existing uuid": {
|
||||||
url: "http://localhost:3000/capes/853c80ef3c3749fdaa49938b674adae6",
|
url: "http://localhost:3000/capes/853c80ef3c3749fdaa49938b674adae6",
|
||||||
@ -480,9 +480,9 @@ describe("Crafatar", function() {
|
|||||||
crc32: 0
|
crc32: 0
|
||||||
},
|
},
|
||||||
"cape with non-existent uuid defaulting to url": {
|
"cape with non-existent uuid defaulting to url": {
|
||||||
url: "http://localhost:3000/capes/00000000000000000000000000000000?default=http%3A%2F%2Fexample.com",
|
url: "http://localhost:3000/capes/00000000000000000000000000000000?default=http%3A%2F%2Fexample.com%2FCaseSensitive",
|
||||||
crc32: 0,
|
crc32: 0,
|
||||||
redirect: "http://example.com"
|
redirect: "http://example.com/CaseSensitive"
|
||||||
},
|
},
|
||||||
"skin with existing username": {
|
"skin with existing username": {
|
||||||
url: "http://localhost:3000/skins/jeb_",
|
url: "http://localhost:3000/skins/jeb_",
|
||||||
@ -510,9 +510,9 @@ describe("Crafatar", function() {
|
|||||||
redirect: "/skins/853c80ef3c3749fdaa49938b674adae6?size=16"
|
redirect: "/skins/853c80ef3c3749fdaa49938b674adae6?size=16"
|
||||||
},
|
},
|
||||||
"skin with non-existent username defaulting to url": {
|
"skin with non-existent username defaulting to url": {
|
||||||
url: "http://localhost:3000/skins/0?default=http%3A%2F%2Fexample.com",
|
url: "http://localhost:3000/skins/0?default=http%3A%2F%2Fexample.com%2FCaseSensitive",
|
||||||
crc32: 0,
|
crc32: 0,
|
||||||
redirect: "http://example.com"
|
redirect: "http://example.com/CaseSensitive"
|
||||||
},
|
},
|
||||||
"skin with existing uuid": {
|
"skin with existing uuid": {
|
||||||
url: "http://localhost:3000/skins/853c80ef3c3749fdaa49938b674adae6",
|
url: "http://localhost:3000/skins/853c80ef3c3749fdaa49938b674adae6",
|
||||||
@ -540,9 +540,9 @@ describe("Crafatar", function() {
|
|||||||
redirect: "/skins/853c80ef3c3749fdaa49938b674adae6?size=16"
|
redirect: "/skins/853c80ef3c3749fdaa49938b674adae6?size=16"
|
||||||
},
|
},
|
||||||
"skin with non-existent uuid defaulting to url": {
|
"skin with non-existent uuid defaulting to url": {
|
||||||
url: "http://localhost:3000/skins/00000000000000000000000000000000?default=http%3A%2F%2Fexample.com",
|
url: "http://localhost:3000/skins/00000000000000000000000000000000?default=http%3A%2F%2Fexample.com%2FCaseSensitive",
|
||||||
crc32: 0,
|
crc32: 0,
|
||||||
redirect: "http://example.com"
|
redirect: "http://example.com/CaseSensitive"
|
||||||
},
|
},
|
||||||
"head render with existing username": {
|
"head render with existing username": {
|
||||||
url: "http://localhost:3000/renders/head/jeb_?scale=2",
|
url: "http://localhost:3000/renders/head/jeb_?scale=2",
|
||||||
@ -570,9 +570,9 @@ describe("Crafatar", function() {
|
|||||||
redirect: "/avatars/853c80ef3c3749fdaa49938b674adae6?scale=2"
|
redirect: "/avatars/853c80ef3c3749fdaa49938b674adae6?scale=2"
|
||||||
},
|
},
|
||||||
"head render with non-existent username defaulting to url": {
|
"head render with non-existent username defaulting to url": {
|
||||||
url: "http://localhost:3000/renders/head/0?scale=2&default=http%3A%2F%2Fexample.com",
|
url: "http://localhost:3000/renders/head/0?scale=2&default=http%3A%2F%2Fexample.com%2FCaseSensitive",
|
||||||
crc32: 0,
|
crc32: 0,
|
||||||
redirect: "http://example.com"
|
redirect: "http://example.com/CaseSensitive"
|
||||||
},
|
},
|
||||||
"helm head render with existing username": {
|
"helm head render with existing username": {
|
||||||
url: "http://localhost:3000/renders/head/jeb_?scale=2&helm",
|
url: "http://localhost:3000/renders/head/jeb_?scale=2&helm",
|
||||||
@ -600,9 +600,9 @@ describe("Crafatar", function() {
|
|||||||
redirect: "/renders/head/853c80ef3c3749fdaa49938b674adae6?scale=2&helm="
|
redirect: "/renders/head/853c80ef3c3749fdaa49938b674adae6?scale=2&helm="
|
||||||
},
|
},
|
||||||
"helm head render with non-existent username defaulting to url": {
|
"helm head render with non-existent username defaulting to url": {
|
||||||
url: "http://localhost:3000/renders/head/0?scale=2&helm&default=http%3A%2F%2Fexample.com",
|
url: "http://localhost:3000/renders/head/0?scale=2&helm&default=http%3A%2F%2Fexample.com%2FCaseSensitive",
|
||||||
crc32: 0,
|
crc32: 0,
|
||||||
redirect: "http://example.com"
|
redirect: "http://example.com/CaseSensitive"
|
||||||
},
|
},
|
||||||
"head render with existing uuid": {
|
"head render with existing uuid": {
|
||||||
url: "http://localhost:3000/renders/head/853c80ef3c3749fdaa49938b674adae6?scale=2",
|
url: "http://localhost:3000/renders/head/853c80ef3c3749fdaa49938b674adae6?scale=2",
|
||||||
@ -630,9 +630,9 @@ describe("Crafatar", function() {
|
|||||||
redirect: "/renders/head/853c80ef3c3749fdaa49938b674adae6?scale=2"
|
redirect: "/renders/head/853c80ef3c3749fdaa49938b674adae6?scale=2"
|
||||||
},
|
},
|
||||||
"head render with non-existent uuid defaulting to url": {
|
"head render with non-existent uuid defaulting to url": {
|
||||||
url: "http://localhost:3000/renders/head/00000000000000000000000000000000?scale=2&default=http%3A%2F%2Fexample.com",
|
url: "http://localhost:3000/renders/head/00000000000000000000000000000000?scale=2&default=http%3A%2F%2Fexample.com%2FCaseSensitive",
|
||||||
crc32: 0,
|
crc32: 0,
|
||||||
redirect: "http://example.com"
|
redirect: "http://example.com/CaseSensitive"
|
||||||
},
|
},
|
||||||
"helm head render with existing uuid": {
|
"helm head render with existing uuid": {
|
||||||
url: "http://localhost:3000/renders/head/853c80ef3c3749fdaa49938b674adae6?scale=2&helm",
|
url: "http://localhost:3000/renders/head/853c80ef3c3749fdaa49938b674adae6?scale=2&helm",
|
||||||
@ -660,9 +660,9 @@ describe("Crafatar", function() {
|
|||||||
redirect: "/renders/head/853c80ef3c3749fdaa49938b674adae6?scale=2&helm="
|
redirect: "/renders/head/853c80ef3c3749fdaa49938b674adae6?scale=2&helm="
|
||||||
},
|
},
|
||||||
"helm head render with non-existent uuid defaulting to url": {
|
"helm head render with non-existent uuid defaulting to url": {
|
||||||
url: "http://localhost:3000/renders/head/00000000000000000000000000000000?scale=2&helm&default=http%3A%2F%2Fexample.com",
|
url: "http://localhost:3000/renders/head/00000000000000000000000000000000?scale=2&helm&default=http%3A%2F%2Fexample.com%2FCaseSensitive",
|
||||||
crc32: 0,
|
crc32: 0,
|
||||||
redirect: "http://example.com"
|
redirect: "http://example.com/CaseSensitive"
|
||||||
},
|
},
|
||||||
"body render with existing username": {
|
"body render with existing username": {
|
||||||
url: "http://localhost:3000/renders/body/jeb_?scale=2",
|
url: "http://localhost:3000/renders/body/jeb_?scale=2",
|
||||||
@ -690,9 +690,9 @@ describe("Crafatar", function() {
|
|||||||
redirect: "/renders/body/853c80ef3c3749fdaa49938b674adae6?scale=2"
|
redirect: "/renders/body/853c80ef3c3749fdaa49938b674adae6?scale=2"
|
||||||
},
|
},
|
||||||
"body render with non-existent username defaulting to url": {
|
"body render with non-existent username defaulting to url": {
|
||||||
url: "http://localhost:3000/renders/body/0?scale=2&default=http%3A%2F%2Fexample.com",
|
url: "http://localhost:3000/renders/body/0?scale=2&default=http%3A%2F%2Fexample.com%2FCaseSensitive",
|
||||||
crc32: 0,
|
crc32: 0,
|
||||||
redirect: "http://example.com"
|
redirect: "http://example.com/CaseSensitive"
|
||||||
},
|
},
|
||||||
"helm body render with existing username": {
|
"helm body render with existing username": {
|
||||||
url: "http://localhost:3000/renders/body/jeb_?scale=2&helm",
|
url: "http://localhost:3000/renders/body/jeb_?scale=2&helm",
|
||||||
@ -720,9 +720,9 @@ describe("Crafatar", function() {
|
|||||||
redirect: "/renders/body/853c80ef3c3749fdaa49938b674adae6?scale=2&helm="
|
redirect: "/renders/body/853c80ef3c3749fdaa49938b674adae6?scale=2&helm="
|
||||||
},
|
},
|
||||||
"helm body render with non-existent username defaulting to url": {
|
"helm body render with non-existent username defaulting to url": {
|
||||||
url: "http://localhost:3000/renders/body/0?scale=2&helm&default=http%3A%2F%2Fexample.com",
|
url: "http://localhost:3000/renders/body/0?scale=2&helm&default=http%3A%2F%2Fexample.com%2FCaseSensitive",
|
||||||
crc32: 0,
|
crc32: 0,
|
||||||
redirect: "http://example.com"
|
redirect: "http://example.com/CaseSensitive"
|
||||||
},
|
},
|
||||||
"body render with existing uuid": {
|
"body render with existing uuid": {
|
||||||
url: "http://localhost:3000/renders/body/853c80ef3c3749fdaa49938b674adae6?scale=2",
|
url: "http://localhost:3000/renders/body/853c80ef3c3749fdaa49938b674adae6?scale=2",
|
||||||
@ -750,9 +750,9 @@ describe("Crafatar", function() {
|
|||||||
redirect: "/renders/body/853c80ef3c3749fdaa49938b674adae6?scale=2"
|
redirect: "/renders/body/853c80ef3c3749fdaa49938b674adae6?scale=2"
|
||||||
},
|
},
|
||||||
"body render with non-existent uuid defaulting to url": {
|
"body render with non-existent uuid defaulting to url": {
|
||||||
url: "http://localhost:3000/renders/body/00000000000000000000000000000000?scale=2&default=http%3A%2F%2Fexample.com",
|
url: "http://localhost:3000/renders/body/00000000000000000000000000000000?scale=2&default=http%3A%2F%2Fexample.com%2FCaseSensitive",
|
||||||
crc32: 0,
|
crc32: 0,
|
||||||
redirect: "http://example.com"
|
redirect: "http://example.com/CaseSensitive"
|
||||||
},
|
},
|
||||||
"helm body render with existing uuid": {
|
"helm body render with existing uuid": {
|
||||||
url: "http://localhost:3000/renders/body/853c80ef3c3749fdaa49938b674adae6?scale=2&helm",
|
url: "http://localhost:3000/renders/body/853c80ef3c3749fdaa49938b674adae6?scale=2&helm",
|
||||||
@ -770,9 +770,9 @@ describe("Crafatar", function() {
|
|||||||
crc32: [3317518715, 3621585514]
|
crc32: [3317518715, 3621585514]
|
||||||
},
|
},
|
||||||
"helm body render with non-existent uuid defaulting to url": {
|
"helm body render with non-existent uuid defaulting to url": {
|
||||||
url: "http://localhost:3000/renders/body/00000000000000000000000000000000?scale=2&helm&default=http%3A%2F%2Fexample.com",
|
url: "http://localhost:3000/renders/body/00000000000000000000000000000000?scale=2&helm&default=http%3A%2F%2Fexample.com%2FCaseSensitive",
|
||||||
crc32: 0,
|
crc32: 0,
|
||||||
redirect: "http://example.com"
|
redirect: "http://example.com/CaseSensitive"
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user