Follow @mattwr18's suggestions

This commit is contained in:
roschaefer 2019-08-30 16:00:01 +02:00
parent fd9a355910
commit 98194ef54a
2 changed files with 4 additions and 5 deletions

View File

@ -275,9 +275,6 @@ describe('notifications', () => {
})
describe('updates the post and mentions me again', () => {
const expectedUpdatedContent =
'<br>One more mention to<br><a data-mention-id="you" class="mention" href="/profile/you" target="_blank"><br>@al-capone<br></a><br>and again:<br><a data-mention-id="you" class="mention" href="/profile/you" target="_blank"><br>@al-capone<br></a><br>and again<br><a data-mention-id="you" class="mention" href="/profile/you" target="_blank"><br>@al-capone<br></a><br>'
const updatePostAction = async () => {
const updatedContent = `
One more mention to
@ -307,6 +304,8 @@ describe('notifications', () => {
}
it('creates no duplicate notification for the same resource', async () => {
const expectedUpdatedContent =
'<br>One more mention to<br><a data-mention-id="you" class="mention" href="/profile/you" target="_blank"><br>@al-capone<br></a><br>and again:<br><a data-mention-id="you" class="mention" href="/profile/you" target="_blank"><br>@al-capone<br></a><br>and again<br><a data-mention-id="you" class="mention" href="/profile/you" target="_blank"><br>@al-capone<br></a><br>'
await createPostAction()
await updatePostAction()
const expected = expect.objectContaining({
@ -347,7 +346,7 @@ describe('notifications', () => {
await mutate({ mutation, variables: { id: 'p47' } })
}
describe('but the next mentioning happens after the notification was marked as read', () => {
describe('but the next mention happens after the notification was marked as read', () => {
it('sets the `read` attribute to false again', async () => {
await createPostAction()
await markAsReadAction()

View File

@ -24,7 +24,7 @@ export default {
},
},
methods: {
async markAsRead(notificationSourceId) {
markAsRead(notificationSourceId) {
this.$emit('markAsRead', notificationSourceId)
},
},