From 8e57412dcd7fe8749ebed645e048309618ed01b5 Mon Sep 17 00:00:00 2001 From: Duda Dornelles Date: Thu, 18 Dec 2014 14:36:10 -0200 Subject: \#203 & #204 & #205: fixing client and api for buld mark as read/unread and delete, functional tests are still broken, investigating... --- web-ui/test/spec/services/mail_service.spec.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'web-ui/test/spec/services') diff --git a/web-ui/test/spec/services/mail_service.spec.js b/web-ui/test/spec/services/mail_service.spec.js index be10b934..55ca81c0 100644 --- a/web-ui/test/spec/services/mail_service.spec.js +++ b/web-ui/test/spec/services/mail_service.spec.js @@ -18,7 +18,8 @@ describeComponent('services/mail_service', function () { this.component.trigger(Pixelated.events.mail.read, {ident: 1}); - expect(readRequest.calls.mostRecent().args[0]).toEqual('/mail/1/read'); + expect(readRequest.calls.mostRecent().args[0]).toEqual('/mails/read'); + expect(readRequest.calls.mostRecent().args[1].data).toEqual('{"idents":[1]}'); }); describe('when marks many emails as read', function () { @@ -42,7 +43,7 @@ describeComponent('services/mail_service', function () { it('makes the correct request to the backend', function () { expect(readRequest.calls.mostRecent().args[0]).toEqual('/mails/read'); - expect(readRequest.calls.mostRecent().args[1].data).toEqual({idents: '[1,2]'}); + expect(readRequest.calls.mostRecent().args[1].data).toEqual('{"idents":[1,2]}') }); it('will trigger that a message has been deleted when it is done deleting', function() { -- cgit v1.2.3