-
Notifications
You must be signed in to change notification settings - Fork 13
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
Node client notes and call logs API support[sc-55272] #85
Node client notes and call logs API support[sc-55272] #85
Conversation
This pull request has been linked to Shortcut Story #55272: Node client notes and call logs API support. |
8890d09
to
7b30b2e
Compare
7b30b2e
to
2198fa4
Compare
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.
LGTM but the tests can be improved
test/chartmogul/customer-note.js
Outdated
const CustomerNote = ChartMogul.CustomerNote; | ||
|
||
describe('CustomerNote', () => { | ||
it('create a customer note', () => { |
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.
it('create a customer note', () => { | |
it('creates a note from a customer', () => { |
test/chartmogul/customer-note.js
Outdated
const uuid = 'note_00000000-0000-0000-0000-000000000000'; | ||
|
||
nock(config.API_BASE) | ||
.get('/v1/customer_notes' + '/' + uuid) |
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.
Why + '/'
? You can just use the template strings like how you did here:
chartmogul-node/test/chartmogul/customer.js
Lines 221 to 222 in e1f1b65
nock(config.API_BASE) | |
.get(`/v1/customer_notes?customer_uuid=${customerUuid}`) |
.get('/v1/customer_notes' + '/' + uuid) | |
.get(`v1/customer_notes/${uuid}`) |
test/chartmogul/customer-note.js
Outdated
}; | ||
|
||
nock(config.API_BASE) | ||
.patch('/v1/customer_notes' + '/' + uuid, postBody) |
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.
Same here
test/chartmogul/customer-note.js
Outdated
const uuid = 'con_00000000-0000-0000-0000-000000000000'; | ||
|
||
nock(config.API_BASE) | ||
.delete('/v1/customer_notes' + '/' + uuid) |
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.
Same here. I assume this is a copy-paste mistake 🤔
test/chartmogul/customer-note.js
Outdated
}); | ||
}); | ||
|
||
it('lists all customer notes', () => { |
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.
it('lists all customer notes', () => { | |
it('lists all notes from a customer', () => { |
https://app.shortcut.com/chartmogul/story/55272/node-client-notes-and-call-logs-api-support