Skip to content

Commit d8858f6

Browse files
committed
Update the tests
1 parent 48acb88 commit d8858f6

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

share/CheckComment.http

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Content-Type: application/x-www-form-urlencoded
77
api_key={{$processEnv AKISMET_API_KEY}}
88
&blog=https://github.com/cedx/akismet.js
99
&comment_author=Akismet
10-
&comment_author_url=https://belin.io
10+
&comment_author_url=https://cedric-belin.fr
1111
&comment_content=I'm testing out the Service API.
1212
&comment_type=comment
1313
&is_test=true

share/SubmitHam.http

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Content-Type: application/x-www-form-urlencoded
77
api_key={{$processEnv AKISMET_API_KEY}}
88
&blog=https://github.com/cedx/akismet.js
99
&comment_author=Akismet
10-
&comment_author_url=https://belin.io
10+
&comment_author_url=https://cedric-belin.fr
1111
&comment_content=I'm testing out the Service API.
1212
&comment_type=comment
1313
&is_test=true

test/AuthorTest.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ describe("Author", () => {
2020
it("should return an initialized instance with a non-empty map", () => {
2121
const author = Author.fromJson({
2222
comment_author: "Cédric Belin",
23-
comment_author_email: "cedric@belin.io",
24-
comment_author_url: "https://belin.io",
23+
comment_author_email: "contact@cedric-belin.fr",
24+
comment_author_url: "https://cedric-belin.fr",
2525
user_agent: "Mozilla/5.0",
2626
user_ip: "127.0.0.1",
2727
user_role: "administrator"
2828
});
2929

30-
equal(author.email, "cedric@belin.io");
30+
equal(author.email, "contact@cedric-belin.fr");
3131
equal(author.ipAddress, "127.0.0.1");
3232
equal(author.role, AuthorRole.Administrator);
3333
ok(author.url instanceof URL);
34-
equal(author.url.href, "https://belin.io/");
34+
equal(author.url.href, "https://cedric-belin.fr/");
3535
equal(author.userAgent, "Mozilla/5.0");
3636
});
3737
});
@@ -45,17 +45,17 @@ describe("Author", () => {
4545

4646
it("should return a non-empty map with an initialized instance", () => {
4747
const json = new Author({
48-
email: "cedric@belin.io",
48+
email: "contact@cedric-belin.fr",
4949
ipAddress: "192.168.0.1",
5050
name: "Cédric Belin",
51-
url: "https://belin.io",
51+
url: "https://cedric-belin.fr",
5252
userAgent: "Mozilla/5.0"
5353
}).toJSON();
5454

5555
equal(Object.keys(json).length, 5);
5656
equal(json.comment_author, "Cédric Belin");
57-
equal(json.comment_author_email, "cedric@belin.io");
58-
equal(json.comment_author_url, "https://belin.io/");
57+
equal(json.comment_author_email, "contact@cedric-belin.fr");
58+
equal(json.comment_author_url, "https://cedric-belin.fr/");
5959
equal(json.user_agent, "Mozilla/5.0");
6060
equal(json.user_ip, "192.168.0.1");
6161
});

test/ClientTest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe("Client", () => {
1616
ipAddress: "192.168.0.1",
1717
name: "Akismet",
1818
role: AuthorRole.Administrator,
19-
url: "https://belin.io",
19+
url: "https://cedric-belin.fr",
2020
userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
2121
}),
2222
content: "I'm testing out the Service API.",

test/CommentTest.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe("Comment", () => {
2525
comment_content: "A user comment.",
2626
comment_date_gmt: "2000-01-01T00:00:00.000Z",
2727
comment_type: "blog-post",
28-
referrer: "https://belin.io",
28+
referrer: "https://cedric-belin.fr",
2929
recheck_reason: "The comment has been changed.",
3030
user_ip: "127.0.0.1"
3131
});
@@ -38,7 +38,7 @@ describe("Comment", () => {
3838
equal(comment.date.toISOString(), "2000-01-01T00:00:00.000Z");
3939
ok(comment.referrer instanceof URL);
4040
equal(comment.recheckReason, "The comment has been changed.");
41-
equal(comment.referrer.href, "https://belin.io/");
41+
equal(comment.referrer.href, "https://cedric-belin.fr/");
4242
equal(comment.type, CommentType.BlogPost);
4343
});
4444
});
@@ -55,7 +55,7 @@ describe("Comment", () => {
5555
author: new Author({ipAddress: "127.0.0.1", name: "Cédric Belin", userAgent: "Doom/6.6.6"}),
5656
content: "A user comment.",
5757
date: new Date("2000-01-01T00:00:00.000Z"),
58-
referrer: "https://belin.io",
58+
referrer: "https://cedric-belin.fr",
5959
type: CommentType.BlogPost
6060
}).toJSON();
6161

@@ -64,7 +64,7 @@ describe("Comment", () => {
6464
equal(json.comment_content, "A user comment.");
6565
equal(json.comment_date_gmt, "2000-01-01T00:00:00.000Z");
6666
equal(json.comment_type, "blog-post");
67-
equal(json.referrer, "https://belin.io/");
67+
equal(json.referrer, "https://cedric-belin.fr/");
6868
equal(json.user_agent, "Doom/6.6.6");
6969
equal(json.user_ip, "127.0.0.1");
7070
});

0 commit comments

Comments
 (0)