Skip to content

Commit 3951de4

Browse files
committed
fix: ajuste no path da listagem de tickets
1 parent 432c570 commit 3951de4

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/resources/ticket.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Ticket {
2020
}
2121

2222
list ({ filter, pagination } = {}) {
23-
return this.client.get('employees', {
23+
return this.client.get('tickets', {
2424
...getPaginationQueryParams(pagination),
2525
...filterWith(filter, ['name', 'identifier', 'archived'])
2626
})

test/resources/ticket.spec.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe('Tickets', () => {
4141
})
4242

4343
it('should list tickets by name and with pagination options', async () => {
44-
nock('https://carchost.fieldcontrol.com.br').get('/employees?limit=10&offset=0&q=name:"Luiz"').reply(200, {})
44+
nock('https://carchost.fieldcontrol.com.br').get('/tickets?limit=10&offset=0&q=name:"Luiz"').reply(200, {})
4545
const response = await client.tickets.list({
4646
filter: {
4747
name: 'Luiz'
@@ -55,7 +55,10 @@ describe('Tickets', () => {
5555
})
5656

5757
it('should list tickets by identifier and with pagination options', async () => {
58-
nock('https://carchost.fieldcontrol.com.br').get('/employees?limit=10&offset=0&q=identifier:"1234567"').reply(200, {})
58+
nock('https://carchost.fieldcontrol.com.br')
59+
.get('/tickets?limit=10&offset=0&q=identifier:"1234567"')
60+
.reply(200, {})
61+
5962
const response = await client.tickets.list({
6063
filter: {
6164
identifier: '1234567'
@@ -69,7 +72,10 @@ describe('Tickets', () => {
6972
})
7073

7174
it('should list tickets by identifier, name, archived and with pagination options', async () => {
72-
nock('https://carchost.fieldcontrol.com.br').get('/employees?limit=10&offset=1&q=identifier:"1234567" name:"Freneda" archived:"true"').reply(200, {})
75+
nock('https://carchost.fieldcontrol.com.br')
76+
.get('/tickets?limit=10&offset=1&q=identifier:"1234567" name:"Freneda" archived:"true"')
77+
.reply(200, {})
78+
7379
const response = await client.tickets.list({
7480
filter: {
7581
identifier: '1234567',

0 commit comments

Comments
 (0)