mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-22 07:51:17 +01:00
add test for uuid -> username skin type update
This commit is contained in:
parent
8367c1e519
commit
74ba828701
16
test/test.js
16
test/test.js
@ -775,6 +775,22 @@ describe("Crafatar", function() {
|
|||||||
}(loc));
|
}(loc));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
it("should update the username skin type on uuid request", function(done) {
|
||||||
|
/*eslint-disable handle-callback-err */
|
||||||
|
request.get("http://localhost:3000/renders/body/mhf_alex", function(error, res, body) {
|
||||||
|
cache.get_details("mhf_alex", function(err, details) {
|
||||||
|
assert.strictEqual(details.slim, false);
|
||||||
|
request.get("http://localhost:3000/renders/body/6ab4317889fd490597f60f67d9d76fd9", function(uerror, ures, ubody) {
|
||||||
|
cache.get_details("mhf_alex", function(cerr, cdetails) {
|
||||||
|
/*eslint-enable handle-callback-err */
|
||||||
|
assert.strictEqual(cdetails.slim, true);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it("should return a 422 (invalid size)", function(done) {
|
it("should return a 422 (invalid size)", function(done) {
|
||||||
var size = config.avatars.max_size + 1;
|
var size = config.avatars.max_size + 1;
|
||||||
request.get("http://localhost:3000/avatars/Jake_0?size=" + size, function(error, res, body) {
|
request.get("http://localhost:3000/avatars/Jake_0?size=" + size, function(error, res, body) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user