summaryrefslogtreecommitdiff
path: root/web-ui/test
diff options
context:
space:
mode:
authorDuda Dornelles <ddornell@thoughtworks.com>2014-12-18 14:36:10 -0200
committerDuda Dornelles <ddornell@thoughtworks.com>2014-12-18 14:37:14 -0200
commit8e57412dcd7fe8749ebed645e048309618ed01b5 (patch)
treed736ae52d3fbffee06e482b19702c78041c83f71 /web-ui/test
parent2d07349df9eb7fd3a197c0c3a9f7180af441f82c (diff)
\#203 & #204 & #205: fixing client and api for buld mark as read/unread and delete, functional tests are still broken, investigating...
Diffstat (limited to 'web-ui/test')
-rw-r--r--web-ui/test/spec/services/mail_service.spec.js5
1 files changed, 3 insertions, 2 deletions
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() {