mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-22 07:51:17 +01:00
fix test for TooManyRequests
This commit is contained in:
parent
0ec97e9ba1
commit
679e72759a
18
test/test.js
18
test/test.js
@ -881,17 +881,21 @@ describe("Crafatar", function() {
|
|||||||
|
|
||||||
if (id_type === "uuid") {
|
if (id_type === "uuid") {
|
||||||
it("uuid should be rate limited", function(done) {
|
it("uuid should be rate limited", function(done) {
|
||||||
networking.get_profile(rid, id, function(err, profile) {
|
networking.get_profile(rid, id, function() {
|
||||||
assert.ifError(err);
|
networking.get_profile(rid, id, function(err, profile) {
|
||||||
assert.strictEqual(profile.error, "TooManyRequests");
|
assert.strictEqual(err, "TooManyRequests");
|
||||||
done();
|
assert.strictEqual(profile.error, "TooManyRequestsException");
|
||||||
|
done();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
it("username should NOT be rate limited (username)", function(done) {
|
it("username should NOT be rate limited (username)", function(done) {
|
||||||
helpers.get_avatar(rid, id, false, 160, function(err, status, image) {
|
helpers.get_avatar(rid, id, false, 160, function() {
|
||||||
assert.strictEqual(err, null);
|
helpers.get_avatar(rid, id, false, 160, function(err, status, image) {
|
||||||
done();
|
assert.strictEqual(err, null);
|
||||||
|
done();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user