mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
fix test for TooManyRequests
This commit is contained in:
parent
0ec97e9ba1
commit
679e72759a
@ -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));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user