diff options
Diffstat (limited to 'web-ui/test/spec')
-rw-r--r-- | web-ui/test/spec/mail_view/ui/mail_view.spec.js | 1 | ||||
-rw-r--r-- | web-ui/test/spec/services/mail_service.spec.js | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/web-ui/test/spec/mail_view/ui/mail_view.spec.js b/web-ui/test/spec/mail_view/ui/mail_view.spec.js index bb0c7851..b84ecfe6 100644 --- a/web-ui/test/spec/mail_view/ui/mail_view.spec.js +++ b/web-ui/test/spec/mail_view/ui/mail_view.spec.js @@ -181,7 +181,6 @@ describeComponent('mail_view/ui/mail_view', function () { var tags = testData.mail.tags.slice(); tags.push('Test'); - expect(tagListRefreshEvent).toHaveBeenTriggeredOn(document); expect(tagsUpdateEvent).toHaveBeenTriggeredOnAndWith(document, { ident: testData.mail.ident, tags: tags}); }); diff --git a/web-ui/test/spec/services/mail_service.spec.js b/web-ui/test/spec/services/mail_service.spec.js index 2de4e76b..9077969a 100644 --- a/web-ui/test/spec/services/mail_service.spec.js +++ b/web-ui/test/spec/services/mail_service.spec.js @@ -91,6 +91,7 @@ describeComponent('services/mail_service', function () { it('updates the tags of the desired message', function () { spyOn(this.component, 'refreshMails'); + var tagListRefreshEvent = spyOnEvent(document, Pixelated.events.dispatchers.tags.refreshTagList); var updateTagsReturnValue = { tags: ['website'], mailbox: 'inbox'}; var deferred = $.Deferred(); var spyAjax = spyOn($, 'ajax').and.returnValue(deferred); @@ -106,6 +107,7 @@ describeComponent('services/mail_service', function () { expect(spyAjax.calls.all()[0].args[0]).toEqual('/mail/1/tags'); expect(spyAjax.calls.all()[0].args[1].data).toEqual(JSON.stringify({ newtags: email1.tags } )); expect(this.component.refreshMails).toHaveBeenCalled(); + expect(tagListRefreshEvent).toHaveBeenTriggeredOn(document); }); it('triggers an error message when it can\'t update the tags', function () { |