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

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
artkravchenko committed Nov 9, 2016
1 parent 04670b9 commit 895425e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/api/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,6 @@ export default class ApiController {
return post;
});

posts = await hidePostsData(posts, ctx, this.bookshelf.knex);
ctx.body = posts;
};

Expand Down
17 changes: 17 additions & 0 deletions test/integration/api/school.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,21 @@ describe('Post', () => {
);
});
});

describe('/api/v1/schools/new', () => {
describe('Not authenticated user', () => {
it('responds with error', async () => {
await expect(
{ url: '/api/v1/schools/new', method: 'POST', body: { name: 'test' } },
'not to open authorized'
);
});
});

describe('Authenticated user', () => {
it('if school doesn\' exist', async () => {

});
});
});
});

0 comments on commit 895425e

Please sign in to comment.