|
@@ -17,24 +17,36 @@ describe('Avatar Serving', function(){
|
|
});
|
|
});
|
|
describe('UUID', function(){
|
|
describe('UUID', function(){
|
|
it("should be an invalid uuid", function(done){
|
|
it("should be an invalid uuid", function(done){
|
|
- assert.equal(helpers.uuid_valid("invaliduuid"), false);
|
|
|
|
|
|
+ assert.strictEqual(helpers.uuid_valid("invaliduuid"), false);
|
|
done();
|
|
done();
|
|
});
|
|
});
|
|
it("should be a valid uuid", function(done){
|
|
it("should be a valid uuid", function(done){
|
|
- assert.equal(helpers.uuid_valid("0098cb60fa8e427cb299793cbd302c9a"), true);
|
|
|
|
|
|
+ assert.strictEqual(helpers.uuid_valid("0098cb60fa8e427cb299793cbd302c9a"), true);
|
|
done();
|
|
done();
|
|
});
|
|
});
|
|
|
|
+ it("should not exist", function(done){
|
|
|
|
+ networking.get_profile("00000000000000000000000000000000", function(err, profile) {
|
|
|
|
+ assert.strictEqual(err, 0);
|
|
|
|
+ done();
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ it("should exist without skin", function(done) {
|
|
|
|
+ helpers.get_avatar("ec561538f3fd461daff5086b22154bce", false, 160, function(err, status, image) {
|
|
|
|
+ assert.strictEqual(status, 3);
|
|
|
|
+ done();
|
|
|
|
+ });
|
|
|
|
+ });
|
|
});
|
|
});
|
|
describe('Avatar', function(){
|
|
describe('Avatar', function(){
|
|
it("should be downloaded", function(done) {
|
|
it("should be downloaded", function(done) {
|
|
helpers.get_avatar(uuid, false, 160, function(err, status, image) {
|
|
helpers.get_avatar(uuid, false, 160, function(err, status, image) {
|
|
- assert.equal(status, 2);
|
|
|
|
|
|
+ assert.strictEqual(status, 2);
|
|
done();
|
|
done();
|
|
});
|
|
});
|
|
});
|
|
});
|
|
it("should be local", function(done) {
|
|
it("should be local", function(done) {
|
|
helpers.get_avatar(uuid, false, 160, function(err, status, image) {
|
|
helpers.get_avatar(uuid, false, 160, function(err, status, image) {
|
|
- assert.equal(status, 1);
|
|
|
|
|
|
+ assert.strictEqual(status, 1);
|
|
done();
|
|
done();
|
|
});
|
|
});
|
|
});
|
|
});
|
|
@@ -45,7 +57,7 @@ describe('Avatar Serving', function(){
|
|
});
|
|
});
|
|
it("should be rate limited", function(done) {
|
|
it("should be rate limited", function(done) {
|
|
helpers.get_avatar(uuid, false, 160, function(err, status, image) {
|
|
helpers.get_avatar(uuid, false, 160, function(err, status, image) {
|
|
- assert.equal(err, null);
|
|
|
|
|
|
+ assert.strictEqual(err, null);
|
|
done();
|
|
done();
|
|
});
|
|
});
|
|
});
|
|
});
|