Merge pull request #7091 from HabitRPG/api-v3-client

[API v3] Client
This commit is contained in:
Matteo Pagliazzi
2016-05-11 16:36:22 +02:00
79 changed files with 2747 additions and 1241 deletions
@@ -0,0 +1,22 @@
import {
generateUser,
} from '../../../../helpers/api-integration/v3';
describe('POST /user/mark-pms-read', () => {
let user;
beforeEach(async () => {
user = await generateUser();
});
// More tests in common code unit tests
it('marks user\'s private messages as read', async () => {
await user.update({
'inbox.newMessages': 1,
});
await user.post('/user/mark-pms-read');
await user.sync();
expect(user.inbox.newMessages).to.equal(0);
});
});