-
Notifications
You must be signed in to change notification settings - Fork 8
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
Conversation
test/article.test.js
Outdated
@@ -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; |
There was a problem hiding this comment.
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
test/article.test.js
Outdated
@@ -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; |
There was a problem hiding this comment.
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
test/article.test.js
Outdated
@@ -10,7 +10,8 @@ dotenv.config(); | |||
|
|||
chai.use(chaiHttp); | |||
chai.should(); | |||
|
|||
let slug; | |||
let userId; |
There was a problem hiding this comment.
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
db2270d
to
0aec55b
Compare
…ticle method-validate article fields-create the update article routes-write unit test for update article[Delivers #167982241]
0aec55b
to
ceeeb7d
Compare
What does this PR do?
User can update the articles they authored.
Description of Task to be completed?
How should this be manually tested?
api/v1/articles/:slug
with aPATCH
method on postman and provide the changes he/she wants to make on the article.Any background context you want to provide?
What are the relevant pivotal tracker stories?
Screenshots (if appropriate)
Questions: