Skip to content

Commit

Permalink
Merge pull request #57 from andela/ch-test-tag-articles
Browse files Browse the repository at this point in the history
Chore: implement test on article tags
  • Loading branch information
Rotimi Babalola authored Apr 8, 2019
2 parents 1754f73 + 2071a49 commit 73ee0e3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions server/helpers/tagsHelpers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import models from '../models';

const { Keyword } = models;

const serverError = 'Server error, please try again later';

const tagging = {
Expand Down
16 changes: 16 additions & 0 deletions tests/tag.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import chai, { expect } from 'chai';
import chaiHttp from 'chai-http';
import tagging from '../server/helpers/tagsHelpers';

chai.use(chaiHttp);

describe('Tags', () => {
it('should accept an id and string of article tags', async () => {
const articleTags = await tagging.saveArticleTags(
'7139d3af-b8b4-44f6-a49f-9305791700f4',
'Jupiter',
'Mecury'
);
expect(articleTags).to.be.an('object');
});
});

0 comments on commit 73ee0e3

Please sign in to comment.