Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

164796910 Adds Comment Edit History feature #80

Merged
merged 2 commits into from
Apr 29, 2019

Conversation

micah-akpan
Copy link
Contributor

@micah-akpan micah-akpan commented Apr 22, 2019

Description

Add a comment edit history feature to facilitate the retrieval of a comment's edit history

Type of change

New feature (non-breaking change that adds functionality)

How Has This Been Tested?

  • unit tests
  • integration tests

Checklist:

  • My code follows the style guidelines of this project
  • I have linted my code prior to submission
  • I have added tests that prove my fix is effective or that my feature works

Screenshots

  • Postman:
    (no edits yet)

comment edit history - empty

(new edits has been made)

comment-edit-history

  • Flowchart
    comment-history

PT

164796910

@micah-akpan micah-akpan force-pushed the 164796910-comment-edit-history branch from a577d64 to a916e2b Compare April 22, 2019 20:45
@micah-akpan micah-akpan changed the title 164796910 Adds a Comment Edit History feature 164796910 Adds Comment Edit History feature Apr 22, 2019
@@ -83,7 +83,7 @@ describe('Util test', () => {
});
});

it('should return error 2', () => {
it('should return error', () => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace 'should·return·error' with "should·return·error" prettier/prettier
Strings must use doublequote quotes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been fixed a long time ago. It should be a problem with HoundCI server

const res = {};
const next = sinon.spy();
trimBody(req, res, next);
req.body.should.deep.equal({ name: 'Micah', seenGot: true });

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace 'Micah' with "Micah" prettier/prettier
Strings must use doublequote quotes


it('should trim request body', () => {
const req = {
body: { name: ' Micah ', seenGot: true }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace '···Micah·' with "···Micah·" prettier/prettier
Strings must use doublequote quotes

next.called.should.equal(true);
});

it('should trim request body', () => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace 'should·trim·request·body' with "should·trim·request·body" prettier/prettier
Strings must use doublequote quotes

const res = {};
const next = sinon.spy();
trimBody(req, res, next);
req.body.should.deep.equal({ name: 'Micah', cohort: '46' });

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace 'Micah',·cohort:·'46' with "Micah",·cohort:·"46" prettier/prettier
Strings must use doublequote quotes

@@ -0,0 +1,29 @@
import 'chai/register-should';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definition for rule 'jsx-a11y/anchor-is-valid' was not found jsx-a11y/anchor-is-valid
Replace 'chai/register-should' with "chai/register-should" prettier/prettier
Strings must use doublequote quotes

invalidarticleUUID,
validCommentId: '979eaa2e-5b8f-4103-8192-4639afae2bb9',
validArticleId: '979eaa2e-5b8f-4103-8192-4639afae2ba8',
invalidCommentId: '979eaa2e-5b8f-4103-8192-4639afae2bb'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace '979eaa2e-5b8f-4103-8192-4639afae2bb' with "979eaa2e-5b8f-4103-8192-4639afae2bb" prettier/prettier
Strings must use doublequote quotes

invalidComment,
invalidarticleUUID,
validCommentId: '979eaa2e-5b8f-4103-8192-4639afae2bb9',
validArticleId: '979eaa2e-5b8f-4103-8192-4639afae2ba8',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace '979eaa2e-5b8f-4103-8192-4639afae2ba8' with "979eaa2e-5b8f-4103-8192-4639afae2ba8" prettier/prettier
Strings must use doublequote quotes

uncompleteCommentBody,
invalidComment,
invalidarticleUUID,
validCommentId: '979eaa2e-5b8f-4103-8192-4639afae2bb9',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace '979eaa2e-5b8f-4103-8192-4639afae2bb9' with "979eaa2e-5b8f-4103-8192-4639afae2bb9" prettier/prettier
Strings must use doublequote quotes

if (err) return done(err);
const { status, body } = res;
status.should.equal(500);
body.status.should.equal('error');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace 'error' with "error" prettier/prettier
Strings must use doublequote quotes

@micah-akpan micah-akpan force-pushed the 164796910-comment-edit-history branch from 8fac461 to 8a34522 Compare April 24, 2019 12:17
Copy link
Contributor

@ssanusi ssanusi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@chikeozulumba chikeozulumba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good implementation @micah-akpan
LGTM

@Simplemart17
Copy link
Contributor

LGTM

@micah-akpan micah-akpan force-pushed the 164796910-comment-edit-history branch 2 times, most recently from f552dd5 to 730e9b5 Compare April 26, 2019 14:21
Change function names and make other minor code changes

[#164796892]
Remove console statement

[#164796910]
@micah-akpan micah-akpan force-pushed the 164796910-comment-edit-history branch from 730e9b5 to 742b5ca Compare April 29, 2019 10:10
@Temmyogunbo Temmyogunbo merged commit 6558b6a into develop Apr 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants