Skip to content

Commit ecb9bec

Browse files
committed
Fixed tests
1 parent 1a78852 commit ecb9bec

File tree

5 files changed

+18
-11
lines changed

5 files changed

+18
-11
lines changed

ghost/core/core/server/models/email-batch.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ const EmailBatch = ghostBookshelf.Model.extend({
55

66
defaults() {
77
return {
8-
status: 'pending'
8+
status: 'pending',
9+
fallback_sending_domain: false
910
};
1011
},
1112

ghost/core/test/e2e-api/admin/__snapshots__/activity-feed.test.js.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22699,7 +22699,7 @@ exports[`Activity Feed API Can filter events by post id 2: [headers] 1`] = `
2269922699
Object {
2270022700
"access-control-allow-origin": "http://127.0.0.1:2369",
2270122701
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
22702-
"content-length": "17979",
22702+
"content-length": "18117",
2270322703
"content-type": "application/json; charset=utf-8",
2270422704
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
2270522705
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
@@ -23948,7 +23948,7 @@ exports[`Activity Feed API Returns email delivered events in activity feed 2: [h
2394823948
Object {
2394923949
"access-control-allow-origin": "http://127.0.0.1:2369",
2395023950
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
23951-
"content-length": "1051",
23951+
"content-length": "1074",
2395223952
"content-type": "application/json; charset=utf-8",
2395323953
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
2395423954
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
@@ -23982,7 +23982,7 @@ exports[`Activity Feed API Returns email opened events in activity feed 2: [head
2398223982
Object {
2398323983
"access-control-allow-origin": "http://127.0.0.1:2369",
2398423984
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
23985-
"content-length": "1048",
23985+
"content-length": "1071",
2398623986
"content-type": "application/json; charset=utf-8",
2398723987
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
2398823988
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
@@ -24040,7 +24040,7 @@ exports[`Activity Feed API Returns email sent events in activity feed 2: [header
2404024040
Object {
2404124041
"access-control-allow-origin": "http://127.0.0.1:2369",
2404224042
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
24043-
"content-length": "3860",
24043+
"content-length": "3952",
2404424044
"content-type": "application/json; charset=utf-8",
2404524045
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
2404624046
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,

ghost/core/test/e2e-api/admin/__snapshots__/emails.test.js.snap

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ Object {
490490
"emails": Array [
491491
Object {
492492
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
493+
"csd_email_count": null,
493494
"delivered_count": 1,
494495
"email_count": 0,
495496
"error": null,
@@ -517,6 +518,7 @@ Object {
517518
},
518519
Object {
519520
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
521+
"csd_email_count": null,
520522
"delivered_count": 0,
521523
"email_count": 3,
522524
"error": "Everything went south",
@@ -560,7 +562,7 @@ exports[`Emails API Can browse emails 2: [headers] 1`] = `
560562
Object {
561563
"access-control-allow-origin": "http://127.0.0.1:2369",
562564
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
563-
"content-length": "1405",
565+
"content-length": "1451",
564566
"content-type": "application/json; charset=utf-8",
565567
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
566568
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
@@ -689,6 +691,7 @@ Object {
689691
"emails": Array [
690692
Object {
691693
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
694+
"csd_email_count": null,
692695
"delivered_count": 1,
693696
"email_count": 0,
694697
"error": null,
@@ -722,7 +725,7 @@ exports[`Emails API Can read an email 2: [headers] 1`] = `
722725
Object {
723726
"access-control-allow-origin": "http://127.0.0.1:2369",
724727
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
725-
"content-length": "642",
728+
"content-length": "665",
726729
"content-type": "application/json; charset=utf-8",
727730
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
728731
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
@@ -736,6 +739,7 @@ Object {
736739
"emails": Array [
737740
Object {
738741
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
742+
"csd_email_count": null,
739743
"delivered_count": 0,
740744
"email_count": 3,
741745
"error": "Everything went south",
@@ -769,7 +773,7 @@ exports[`Emails API Can retry a failed email 2: [headers] 1`] = `
769773
Object {
770774
"access-control-allow-origin": "http://127.0.0.1:2369",
771775
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
772-
"content-length": "688",
776+
"content-length": "711",
773777
"content-type": "application/json; charset=utf-8",
774778
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
775779
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
@@ -783,6 +787,7 @@ Object {
783787
"emails": Array [
784788
Object {
785789
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
790+
"csd_email_count": null,
786791
"delivered_count": 0,
787792
"email_count": 1,
788793
"error": null,
@@ -817,7 +822,7 @@ exports[`Emails API Does default replacements on the HTML body of an old email 2
817822
Object {
818823
"access-control-allow-origin": "http://127.0.0.1:2369",
819824
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
820-
"content-length": "1061",
825+
"content-length": "1084",
821826
"content-type": "application/json; charset=utf-8",
822827
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
823828
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,

ghost/core/test/e2e-server/click-tracking.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('Click Tracking', function () {
3939
body: {
4040
posts: [{
4141
title: 'My Newsletter',
42-
html: `<p>External link <a href="https://example.com/a">https://example.com/a</a>; Internal link <a href=${siteUrl.href}/about">${siteUrl.href}/about</a>;Ghost homepage <a href="https://ghost.org">https://ghost.org</a></p>`
42+
html: `<p>External link <a href="https://example.com/a">https://example.com/a</a>; Internal link <a href="${siteUrl.href}/about">${siteUrl.href}/about</a>;Ghost homepage <a href="https://ghost.org">https://ghost.org</a></p>`
4343
}]
4444
}
4545
});

ghost/core/test/utils/fixtures/data-generator.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,8 @@ DataGenerator.Content = {
783783
id: ObjectId().toHexString(),
784784
email_id: null, // emails[0] relation added later
785785
provider_id: 'email1@testing.mailgun.net',
786-
status: 'submitted'
786+
status: 'submitted',
787+
fallback_sending_domain: false
787788
}
788789
],
789790

0 commit comments

Comments
 (0)