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

#167982241 User can update their articles #71

Merged
merged 1 commit into from
Aug 20, 2019

Conversation

czarjulius
Copy link
Contributor

What does this PR do?

User can update the articles they authored.

Description of Task to be completed?

  • Create an update article method
  • Validate article fields
  • Create the update article routes
  • Write unit test for an update article

How should this be manually tested?

  • User should hit api/v1/articles/:slug with a PATCH method on postman and provide the changes he/she wants to make on the article.

Any background context you want to provide?

  • N/A

What are the relevant pivotal tracker stories?

Screenshots (if appropriate)

Screenshot 2019-08-20 at 7 42 12 AM

Questions:

  • N/A

@@ -52,6 +53,8 @@ describe('Articles', () => {
.field(testArticle)
.attach('images', path.join(__dirname, 'img/test.jpg'), 'test.png')
.end((err, res) => {
slug = res.body.data[0].slug;
userId = res.body.data[0].userId;
Copy link

Choose a reason for hiding this comment

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

Use object destructuring prefer-destructuring

@@ -52,6 +53,8 @@ describe('Articles', () => {
.field(testArticle)
.attach('images', path.join(__dirname, 'img/test.jpg'), 'test.png')
.end((err, res) => {
slug = res.body.data[0].slug;
Copy link

Choose a reason for hiding this comment

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

Use object destructuring prefer-destructuring

@@ -10,7 +10,8 @@ dotenv.config();

chai.use(chaiHttp);
chai.should();

let slug;
let userId;
Copy link

Choose a reason for hiding this comment

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

'userId' is assigned a value but never used no-unused-vars

@czarjulius czarjulius temporarily deployed to ah-nyati-backend-staging-pr-71 August 20, 2019 06:43 Inactive
@czarjulius czarjulius force-pushed the ft-user-update-article-167982241 branch from db2270d to 0aec55b Compare August 20, 2019 12:23
@czarjulius czarjulius temporarily deployed to ah-nyati-backend-staging-pr-71 August 20, 2019 12:23 Inactive
…ticle method-validate article fields-create the update article routes-write unit test for update article[Delivers #167982241]
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.

None yet

6 participants