fix tests Jake0oo0 -> Jake_0

This commit is contained in:
jomo 2015-02-21 21:05:00 +01:00
parent 4b920d57e8
commit ec0840794b
4 changed files with 15 additions and 15 deletions

View File

@ -8,7 +8,7 @@ Inspired by [Gravatar](https://gravatar.com) (hence the name) and [Minotar](http
Image manipulation is done by [lwip](https://github.com/EyalAr/lwip). 3D renders are created with [node-canvas](https://github.com/Automattic/node-canvas), based on math by [confuser](https://github.com/confuser/serverless-mc-skin-viewer). Image manipulation is done by [lwip](https://github.com/EyalAr/lwip). 3D renders are created with [node-canvas](https://github.com/Automattic/node-canvas), based on math by [confuser](https://github.com/confuser/serverless-mc-skin-viewer).
![jomo's avatar](https://crafatar.com/avatars/ae795aa86327408e92ab25c8a59f3ba1?size=128) ![Jake0oo0's avatar](https://crafatar.com/avatars/2d5aa9cdaeb049189930461fc9b91cc5?size=128) ![Notch's avatar](https://crafatar.com/avatars/069a79f444e94726a5befca90e38aaf5?size=128) ![sk89q's avatar](https://crafatar.com/avatars/0ea8eca3dbf647cc9d1ac64551ca975c?size=128) ![md_5's avatar](https://crafatar.com/avatars/af74a02d19cb445bb07f6866a861f783?size=128) ![jomo's avatar](https://crafatar.com/avatars/ae795aa86327408e92ab25c8a59f3ba1?size=128) ![Jake_0's avatar](https://crafatar.com/avatars/2d5aa9cdaeb049189930461fc9b91cc5?size=128) ![Notch's avatar](https://crafatar.com/avatars/069a79f444e94726a5befca90e38aaf5?size=128) ![sk89q's avatar](https://crafatar.com/avatars/0ea8eca3dbf647cc9d1ac64551ca975c?size=128) ![md_5's avatar](https://crafatar.com/avatars/af74a02d19cb445bb07f6866a861f783?size=128)
## Usage / Documentation ## Usage / Documentation
Please [visit the website](https://crafatar.com) for details. Please [visit the website](https://crafatar.com) for details.

View File

@ -231,8 +231,8 @@ img.preload {
.avatar.jomo {background-image: url("/avatars/ae795aa86327408e92ab25c8a59f3ba1?size=64")} .avatar.jomo {background-image: url("/avatars/ae795aa86327408e92ab25c8a59f3ba1?size=64")}
.avatar.jomo:hover {background-image: url("/avatars/ae795aa86327408e92ab25c8a59f3ba1?size=64&helm")} .avatar.jomo:hover {background-image: url("/avatars/ae795aa86327408e92ab25c8a59f3ba1?size=64&helm")}
.avatar.jake0oo0 {background-image: url("/avatars/2d5aa9cdaeb049189930461fc9b91cc5?size=64")} .avatar.jake_0 {background-image: url("/avatars/2d5aa9cdaeb049189930461fc9b91cc5?size=64")}
.avatar.jake0oo0:hover {background-image: url("/avatars/2d5aa9cdaeb049189930461fc9b91cc5?size=64&helm")} .avatar.jake_0:hover {background-image: url("/avatars/2d5aa9cdaeb049189930461fc9b91cc5?size=64&helm")}
.avatar.sk89q {background-image: url("/avatars/0ea8eca3dbf647cc9d1ac64551ca975c?size=64")} .avatar.sk89q {background-image: url("/avatars/0ea8eca3dbf647cc9d1ac64551ca975c?size=64")}
.avatar.sk89q:hover {background-image: url("/avatars/0ea8eca3dbf647cc9d1ac64551ca975c?size=64&helm")} .avatar.sk89q:hover {background-image: url("/avatars/0ea8eca3dbf647cc9d1ac64551ca975c?size=64&helm")}

View File

@ -15,7 +15,7 @@ var request = require("request");
config.http_timeout *= 3; config.http_timeout *= 3;
// no spam // no spam
logging.log = function() {}; //logging.log = function() {};
var uuids = fs.readFileSync("test/uuids.txt").toString().split(/\r?\n/); var uuids = fs.readFileSync("test/uuids.txt").toString().split(/\r?\n/);
var names = fs.readFileSync("test/usernames.txt").toString().split(/\r?\n/); var names = fs.readFileSync("test/usernames.txt").toString().split(/\r?\n/);
@ -211,7 +211,7 @@ describe("Crafatar", function() {
it("should return a 422 (invalid size)", function(done) { it("should return a 422 (invalid size)", function(done) {
var size = config.max_size + 1; var size = config.max_size + 1;
request.get("http://localhost:3000/avatars/Jake0oo0?size=" + size, function(error, res, body) { request.get("http://localhost:3000/avatars/Jake_0?size=" + size, function(error, res, body) {
assert.equal(422, res.statusCode); assert.equal(422, res.statusCode);
done(); done();
}); });
@ -219,7 +219,7 @@ describe("Crafatar", function() {
it("should return a 422 (invalid scale)", function(done) { it("should return a 422 (invalid scale)", function(done) {
var scale = config.max_scale + 1; var scale = config.max_scale + 1;
request.get("http://localhost:3000/renders/head/Jake0oo0?scale=" + scale, function(error, res, body) { request.get("http://localhost:3000/renders/head/Jake_0?scale=" + scale, function(error, res, body) {
assert.equal(422, res.statusCode); assert.equal(422, res.statusCode);
done(); done();
}); });
@ -227,14 +227,14 @@ describe("Crafatar", function() {
// no default images for capes, should 404 // no default images for capes, should 404
it("should return a 404 (no cape)", function(done) { it("should return a 404 (no cape)", function(done) {
request.get("http://localhost:3000/capes/Jake0oo0", function(error, res, body) { request.get("http://localhost:3000/capes/Jake_0", function(error, res, body) {
assert.equal(404, res.statusCode); assert.equal(404, res.statusCode);
done(); done();
}); });
}); });
it("should return a 422 (invalid render type)", function(done) { it("should return a 422 (invalid render type)", function(done) {
request.get("http://localhost:3000/renders/side/Jake0oo0", function(error, res, body) { request.get("http://localhost:3000/renders/side/Jake_0", function(error, res, body) {
assert.equal(422, res.statusCode); assert.equal(422, res.statusCode);
done(); done();
}); });
@ -246,7 +246,7 @@ describe("Crafatar", function() {
var location = locations[l]; var location = locations[l];
(function(location) { (function(location) {
it("should return a 200 (valid input " + location + ")", function(done) { it("should return a 200 (valid input " + location + ")", function(done) {
request.get("http://localhost:3000/" + location + "/Jake0oo0", function(error, res, body) { request.get("http://localhost:3000/" + location + "/Jake_0", function(error, res, body) {
assert.equal(200, res.statusCode); assert.equal(200, res.statusCode);
done(); done();
}); });
@ -310,7 +310,7 @@ describe("Crafatar", function() {
}); });
}); });
it("should not fail (username, 64x64 skin)", function(done) { it("should not fail (username, 64x64 skin)", function(done) {
helpers.get_render(rid, "Jake0oo0", 6, true, true, function(err, hash, img) { helpers.get_render(rid, "Jake_0", 6, true, true, function(err, hash, img) {
assert.strictEqual(err, null); assert.strictEqual(err, null);
done(); done();
}); });
@ -334,7 +334,7 @@ describe("Crafatar", function() {
}); });
}); });
it("should not be found", function(done) { it("should not be found", function(done) {
helpers.get_cape(rid, "Jake0oo0", function(err, hash, img) { helpers.get_cape(rid, "Jake_0", function(err, hash, img) {
assert.strictEqual(img, null); assert.strictEqual(img, null);
done(); done();
}); });
@ -343,7 +343,7 @@ describe("Crafatar", function() {
describe("Networking: Skin", function() { describe("Networking: Skin", function() {
it("should not fail", function(done) { it("should not fail", function(done) {
helpers.get_cape(rid, "Jake0oo0", function(err, hash, img) { helpers.get_cape(rid, "Jake_0", function(err, hash, img) {
assert.strictEqual(err, null); assert.strictEqual(err, null);
done(); done();
}); });
@ -352,7 +352,7 @@ describe("Crafatar", function() {
before(function() { before(function() {
cache.get_redis().flushall(); cache.get_redis().flushall();
}); });
helpers.get_cape(rid, "Jake0oo0", function(err, hash, img) { helpers.get_cape(rid, "Jake_0", function(err, hash, img) {
assert.strictEqual(err, null); assert.strictEqual(err, null);
done(); done();
}); });

View File

@ -7,7 +7,7 @@ block content
p A blazing fast API for Minecraft faces! p A blazing fast API for Minecraft faces!
.avatar-wrapper .avatar-wrapper
.avatar.jomo(title="jomo's avatar") .avatar.jomo(title="jomo's avatar")
.avatar.jake0oo0(title="jake0oo0's avatar") .avatar.jake_0(title="jake_0's avatar")
.avatar.sk89q(title="sk89q's avatar") .avatar.sk89q(title="sk89q's avatar")
.avatar.md_5(title="md_5's avatar") .avatar.md_5(title="md_5's avatar")
.avatar.notch(title="notch's avatar") .avatar.notch(title="notch's avatar")