Skip to content

Commit

Permalink
✅ Update tests for current news handler
Browse files Browse the repository at this point in the history
  • Loading branch information
jh0ker committed Mar 18, 2020
1 parent e5fb002 commit 3b07879
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@
},
{
"id": 254,
"type": "last",
"subtype": {
"emoji": "",
"title": "Teste das Letzte"
},
"created": "2018-03-20T17:27:51+01:00",
"genres": [
{
Expand All @@ -116,8 +121,8 @@
"name": "Musik 🎶"
},
"tags": [],
"headline": "Das Letzte: Deine Songs zum Glücklichsein",
"short_headline": "Das Letzte",
"headline": "Deine Songs zum Glücklichsein",
"short_headline": "Glücklichsein",
"text": "Heute ist Weltglückstag 🍀🍀🍀 Meine Kollegen aus der 1LIVE-Musikredaktion haben deshalb mal drei Gute-Laune-Songs für dich rausgesucht.",
"attachment": null,
"published": true,
Expand Down
12 changes: 9 additions & 3 deletions handler/__tests__/actionCurrentNews.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ describe('actionCurrentNews', () => {
'Alle Infos',
{
action: 'report_start',
preview: false,
push: 4,
timing: 'evening',
report: 2,
Expand All @@ -36,8 +37,9 @@ describe('actionCurrentNews', () => {
track: {
category: 'Abend-Push',
event: 'Hörfunknachrichten',
label: 'WDR Aktuell',
label: 'WDR aktuell',
subType: 'Audio',
publicationDate: '2018-03-20',
},
}),
],
Expand All @@ -47,6 +49,7 @@ describe('actionCurrentNews', () => {
payload: {
action: 'report_start',
before: [],
preview: false,
push: 4,
timing: 'evening',
report: 2,
Expand All @@ -66,6 +69,7 @@ describe('actionCurrentNews', () => {
payload: {
action: 'report_start',
before: [],
preview: false,
push: 4,
timing: 'evening',
report: 253,
Expand All @@ -85,6 +89,7 @@ describe('actionCurrentNews', () => {
payload: {
action: 'report_start',
before: [],
preview: false,
push: 4,
timing: 'evening',
report: 251,
Expand All @@ -104,19 +109,20 @@ describe('actionCurrentNews', () => {
payload: {
action: 'report_start',
before: [],
preview: false,
push: 4,
timing: 'evening',
report: 254,
type: 'push',
track: {
category: 'Abend-Push',
event: 'Meldung',
label: 'Das Letzte: Deine Songs zum Glücklichsein',
label: 'Deine Songs zum Glücklichsein',
publicationDate: '2018-03-20',
subType: '1.Bubble',
},
},
title: '➡ Das Letzte',
title: '⚗ Teste das Letzte',
},
]
);
Expand Down

0 comments on commit 3b07879

Please sign in to comment.