mirror of
https://github.com/azures04/crafatar.git
synced 2026-05-06 11:00:39 +02:00
fix #22, caused by @e6481e3
This commit is contained in:
12
test/test.js
12
test/test.js
@@ -64,13 +64,13 @@ describe('Crafatar', function() {
|
||||
});
|
||||
it("should not exist (uuid)", function(done) {
|
||||
networking.get_skin_url("00000000000000000000000000000000", function(err, profile) {
|
||||
assert.strictEqual(err, 0);
|
||||
assert.strictEqual(err, null);
|
||||
done();
|
||||
});
|
||||
});
|
||||
it("should not exist (username)", function(done) {
|
||||
networking.get_skin_url("Steve", function(err, profile) {
|
||||
assert.strictEqual(err, 0);
|
||||
assert.strictEqual(err, null);
|
||||
done();
|
||||
});
|
||||
});
|
||||
@@ -154,8 +154,14 @@ describe('Crafatar', function() {
|
||||
before(function() {
|
||||
cache.get_redis().flushall();
|
||||
});
|
||||
it("should be rate limited", function(done) {
|
||||
it("should be rate limited (uuid)", function(done) {
|
||||
helpers.get_avatar(uuid, false, 160, function(err, status, image) {
|
||||
assert.strictEqual(JSON.parse(err).error, "TooManyRequestsException");
|
||||
done();
|
||||
});
|
||||
});
|
||||
it("should NOT be rate limited (username)", function(done) {
|
||||
helpers.get_avatar(username, false, 160, function(err, status, image) {
|
||||
assert.strictEqual(err, null);
|
||||
done();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user