Skip to content
This repository has been archived by the owner on May 9, 2021. It is now read-only.

#161291011 Add comment on an article #46

Merged
merged 2 commits into from
Nov 14, 2018

Conversation

sulenchy
Copy link
Contributor

What does this PR do?

Add comment on an article

Description of Task to be completed?

  • add addCommentOnArticle method
  • add addCommentOnArticle route
  • test the method

How should this be manually tested?

  • clone this repo, cd into it and checkout the branch feature/161291011/comment-on-articles
  • set up your .env variables and local database
  • run npm install to install required packages
  • run npm start to start up the server
  • use postman(or any api testing tool) to test the following routes

Any background context you want to provide?

N/A

What are the relevant pivotal tracker stories?

#161291011

Screenshots (if appropriate)

screen shot 2018-11-12 at 4 08 47 pm

Questions:

N/A

server/routes/api/articles.js Outdated Show resolved Hide resolved
server/controllers/ArticleController.js Outdated Show resolved Hide resolved
server/controllers/ArticleController.js Outdated Show resolved Hide resolved
@sulenchy sulenchy force-pushed the feature/161291011/comment-on-article branch from 6cc4218 to 76f1f2b Compare November 12, 2018 15:33
@coveralls
Copy link

coveralls commented Nov 12, 2018

Pull Request Test Coverage Report for Build 496

  • 23 of 24 (95.83%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 92.462%

Changes Missing Coverage Covered Lines Changed/Added Lines %
server/controllers/CommentController.js 9 10 90.0%
Totals Coverage Status
Change from base Build 471: 0.1%
Covered Lines: 454
Relevant Lines: 474

💛 - Coveralls

@darthrighteous darthrighteous requested a deployment to valinor-ah-backend-stagi-pr-46 November 12, 2018 15:42 Abandoned
@darthrighteous darthrighteous temporarily deployed to valinor-ah-backend-stagi-pr-46 November 12, 2018 15:42 Inactive
@sulenchy sulenchy changed the title feat(coment-on-article): add comment on an article #161291011 Add comment on an article Nov 12, 2018
@sulenchy sulenchy force-pushed the feature/161291011/comment-on-article branch from 76f1f2b to 90b9065 Compare November 13, 2018 06:03
@darthrighteous darthrighteous temporarily deployed to valinor-ah-backend-stagi-pr-46 November 13, 2018 06:04 Inactive
Copy link
Contributor

@augustineezinwa augustineezinwa left a comment

Choose a reason for hiding this comment

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

I don't think you validated for an article that does not exist. What happens if I try to add a comment to a non-existent article with an id 1000? what happens if the id is not a number? Do well to cover the above edge cases.

@darthrighteous darthrighteous temporarily deployed to valinor-ah-backend-stagi-pr-46 November 13, 2018 10:26 Inactive
@sulenchy sulenchy force-pushed the feature/161291011/comment-on-article branch from 3207997 to 2dacb46 Compare November 13, 2018 11:26
@darthrighteous darthrighteous temporarily deployed to valinor-ah-backend-stagi-pr-46 November 13, 2018 11:27 Inactive
@sulenchy sulenchy force-pushed the feature/161291011/comment-on-article branch from 2dacb46 to 0410c8f Compare November 13, 2018 13:20
@darthrighteous darthrighteous temporarily deployed to valinor-ah-backend-stagi-pr-46 November 13, 2018 13:21 Inactive
@sulenchy sulenchy force-pushed the feature/161291011/comment-on-article branch from 0410c8f to a76dac5 Compare November 13, 2018 13:24
@darthrighteous darthrighteous temporarily deployed to valinor-ah-backend-stagi-pr-46 November 13, 2018 13:24 Inactive
- add addCommentOnArticle method
- add addCommentOnArticle route
- test the method

[Finishes #161291011]
@sulenchy sulenchy force-pushed the feature/161291011/comment-on-article branch from a76dac5 to 264deec Compare November 13, 2018 14:01
@darthrighteous darthrighteous temporarily deployed to valinor-ah-backend-stagi-pr-46 November 13, 2018 14:01 Inactive
server/middlewares/ArticleCommentValidation.js Outdated Show resolved Hide resolved
server/routes/api/articles.js Outdated Show resolved Hide resolved
@sulenchy sulenchy force-pushed the feature/161291011/comment-on-article branch from 264deec to f31e94c Compare November 13, 2018 15:01
@darthrighteous darthrighteous temporarily deployed to valinor-ah-backend-stagi-pr-46 November 13, 2018 15:01 Inactive
- implement separation of concern

[Finishes #161291011]
@mbilesanmi mbilesanmi merged commit add00ed into develop Nov 14, 2018
@mbilesanmi mbilesanmi deleted the feature/161291011/comment-on-article branch November 14, 2018 06:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants