Skip to content

Commit bfbbd07

Browse files
committed
Added tests
1 parent 772c080 commit bfbbd07

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

test/integration.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,28 @@ describe('routing', function() {
7272
});
7373
});
7474
});
75+
76+
describe('v2 avatar random requests', function() {
77+
78+
it('can randomly generate a new avatar', function(done) {
79+
request.get('/avatars/random')
80+
.expect(200)
81+
.expect('Content-Type', /image/)
82+
.end(done);
83+
});
84+
85+
it('can randomly generate a new avatar with a custom size', function(done) {
86+
request.get('/avatars/50/random')
87+
.expect(200)
88+
.expect('Content-Type', /image/)
89+
.parse(parseImage).end(function(err, res) {
90+
im(res.body).size(function(_, size) {
91+
expect(size).to.eql({ height: 50, width: 50 });
92+
done();
93+
});
94+
});
95+
});
96+
97+
});
98+
7599
});

0 commit comments

Comments
 (0)