-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgravatar-test.rkt
More file actions
30 lines (23 loc) · 794 Bytes
/
gravatar-test.rkt
File metadata and controls
30 lines (23 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#lang racket
#|
gravatar-test.rkt
GravatarDemo-Racket
Created by Bracken Spencer.
Copyright (c) 2020-2021 Bracken Spencer. All rights reserved.
|#
(require "gravatar.rkt")
(module+ test
(require rackunit rackunit/text-ui)
(define suite
(test-suite
"gravatar.rkt tests"
(test-equal? "md5-email"
(md5-email "email@example.com")
"5658ffccee7f0ebfda2b226238b1eb6e")
(test-equal? "image-url"
(image-url "email@example.com" 200)
"https://www.gravatar.com/avatar/5658ffccee7f0ebfda2b226238b1eb6e?s=200&r=x")
(test-equal? "profile-url"
(profile-url "email@example.com")
"https://www.gravatar.com/5658ffccee7f0ebfda2b226238b1eb6e.json")))
(run-tests suite))