From 74ba82870151bf9138330a2012b2d5dbb517d4ff Mon Sep 17 00:00:00 2001 From: jomo Date: Wed, 20 Jan 2016 01:17:36 +0100 Subject: [PATCH] add test for uuid -> username skin type update --- test/test.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/test.js b/test/test.js index b3b18d1..d8ae20c 100644 --- a/test/test.js +++ b/test/test.js @@ -775,6 +775,22 @@ describe("Crafatar", function() { }(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) { var size = config.avatars.max_size + 1; request.get("http://localhost:3000/avatars/Jake_0?size=" + size, function(error, res, body) {