Skip to content
This repository has been archived by the owner on Oct 1, 2019. It is now read-only.

Commit

Permalink
client.deleteComment test
Browse files Browse the repository at this point in the history
  • Loading branch information
RusAlex committed May 20, 2016
1 parent d57de69 commit 8e1f7c7
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions test/integration/api/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,29 @@ describe('Client test', () => {
client = new ApiClient(API_HOST);
});

it('Get method should work', async () => {
let response = await client.get('/api/v1/test');
describe('Base methods', () => {
it('#GET', async () => {
let response = await client.get('/api/v1/test');

expect(await response.text(), 'to be', 'test message in response');
});
expect(await response.text(), 'to be', 'test message in response');
});

it('Head method should work', async () => {
let response = await client.head('/api/v1/test');
it('#HEAD', async () => {
let response = await client.head('/api/v1/test');

expect(response.status, 'to be', 200);
expect(response.status, 'to be', 200);
});
});

it('checkGeotagExists return false for non existing geotag', async () => {
it('#checkGeotagExists return false for non existing geotag', async () => {
let result = await client.checkGeotagExists('nonexistingname');

expect(result, 'to be false');
});

it('#deleteComment works', async () => {
let result = await client.deleteComment('nonexistingpost', 'nonexistingid');

expect(result.error, 'to be', 'You are not authorized');
});
});

0 comments on commit 8e1f7c7

Please sign in to comment.