Skip to content

Commit 3dbe9b5

Browse files
committed
Allow users to update sermon tags
1 parent daa398e commit 3dbe9b5

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

mirage/factories/sermon.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ export default Factory.extend({
2525
},
2626
bannerUrl() {
2727
return null;
28+
},
29+
tags() {
30+
return "test1,test2";
2831
}
2932
});
3033

tests/acceptance/bulletin/edit-test.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ test("it displays the bulletin to be edited", assert => {
3939
const group = server.create("group");
4040
const sermon = server.create("sermon", {
4141
audioUrl: `${faker.internet.url()}/audio.mp3`,
42-
notes: "these are shorter notes"
42+
notes: "these are shorter notes",
43+
tags: "faith,humility"
4344
});
4445
const bulletin = server.create("bulletin", {
4546
bannerUrl: `${faker.internet.url()}/banner.png`,
@@ -61,6 +62,7 @@ test("it displays the bulletin to be edited", assert => {
6162
assert.equal(page.sermon.speaker, sermon.speaker);
6263
assert.equal(page.sermon.series, sermon.series);
6364
assert.equal(page.sermon.name, sermon.name);
65+
assert.equal(page.sermon.tags, sermon.tags);
6466
});
6567
});
6668

@@ -148,7 +150,9 @@ test("it updates the current bulletin", assert => {
148150
fillPublishedAt("05/27/1984 9:30 AM").
149151
fillServiceOrder("updated service order");
150152

151-
page.sermon.fillNotes("updated sermon notes");
153+
page.sermon.
154+
fillNotes("updated sermon notes").
155+
fillTags("joy,prayer");
152156

153157
page.announcements(0).
154158
fillUrl("http://updated.com").
@@ -171,6 +175,7 @@ test("it updates the current bulletin", assert => {
171175
equalDate(assert, updatedSermon.publishedAt, page.publishedAt);
172176
assert.equal(updatedSermon.audioUrl, page.sermon.audioUrl());
173177
assert.equal(updatedSermon.bannerUrl, page.bannerUrl());
178+
assert.equal(updatedSermon.tags, page.sermon.tags);
174179

175180
const updatedAnnouncement = server.db.announcements.find(announcement.id);
176181
const announcementEditor = page.announcements(0);

0 commit comments

Comments
 (0)