summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaan Sprenkels2018-12-22 14:10:40 +0100
committerDaan Sprenkels2018-12-22 19:09:45 +0100
commit318a37d41c64faa0ed57e913a0ae4e83592da1e5 (patch)
tree496ba31396568db34b5b5c70115a0f6cf88fa5b0 /test
parentf9cc2ff0ef56aa5f0a655f9209321460748ba621 (diff)
Add a test for gravatar urls
Signed-off-by: Daan Sprenkels <hello@dsprenkels.com>
Diffstat (limited to 'test')
-rw-r--r--test/letter-avatars.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/letter-avatars.js b/test/letter-avatars.js
new file mode 100644
index 00000000..4948dec0
--- /dev/null
+++ b/test/letter-avatars.js
@@ -0,0 +1,11 @@
+'use strict'
+
+const assert = require('assert');
+const avatars = require('../lib/letter-avatars')
+
+describe('generateAvatarURL()', function() {
+ it('should return correct urls', function() {
+ assert.equal(avatars.generateAvatarURL('Daan Sprenkels', 'hello@dsprenkels.com', true), 'https://www.gravatar.com/avatar/d41b5f3508cc3f31865566a47dd0336b?s=400');
+ assert.equal(avatars.generateAvatarURL('Daan Sprenkels', 'hello@dsprenkels.com', false), 'https://www.gravatar.com/avatar/d41b5f3508cc3f31865566a47dd0336b?s=96');
+ });
+});