fix test for TooManyRequests

This commit is contained in:
jomo 2015-05-28 01:05:24 +02:00
parent 0ec97e9ba1
commit 679e72759a

View File

@ -881,19 +881,23 @@ describe("Crafatar", function() {
if (id_type === "uuid") {
it("uuid should be rate limited", function(done) {
networking.get_profile(rid, id, function() {
networking.get_profile(rid, id, function(err, profile) {
assert.ifError(err);
assert.strictEqual(profile.error, "TooManyRequests");
assert.strictEqual(err, "TooManyRequests");
assert.strictEqual(profile.error, "TooManyRequestsException");
done();
});
});
});
} else {
it("username should NOT be rate limited (username)", function(done) {
helpers.get_avatar(rid, id, false, 160, function() {
helpers.get_avatar(rid, id, false, 160, function(err, status, image) {
assert.strictEqual(err, null);
done();
});
});
});
}
});
}(iid, iid_type));