Skip to content

Commit

Permalink
fix: Adjust wenichats ticketer tests by including ticketer uuid in th…
Browse files Browse the repository at this point in the history
…e request
  • Loading branch information
Sandro-Meireles committed Dec 24, 2024
1 parent a3754f8 commit ef94d33
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion services/tickets/wenichats/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ func TestOpenAndForward(t *testing.T) {
assert.Equal(t, "{\"history_after\":\"2019-10-07 15:21:30\"}", ticket.Body())
assert.Equal(t, "9688d21d-95aa-4bed-afc7-f31b35731a3d", ticket.ExternalID())
assert.Equal(t, 2, len(logger3.Logs))
test.AssertSnapshot(t, "open_ticket_empty_body", logger3.Logs[0].Request)
test.AssertSnapshot(t, "open_ticket_history_after", logger3.Logs[0].Request)

session.Contact().ClearURNs()
_, err = svc.Open(session, defaultTopic, "{\"history_after\":\"2019-10-07 15:21:30\"}", nil, logger3.Log)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
POST /v1/external/rooms/ HTTP/1.1
Host: chats-engine.dev.cloud.weni.ai
User-Agent: Go-http-client/1.1
Content-Length: 503
Content-Length: 556
Authorization: Bearer ****************
Content-Type: application/json
Accept-Encoding: gzip

{"queue_uuid":"5c85fdf7-d54a-49dd-97ed-7e10077a1f6a","sector_uuid":"1a4bae05-993c-4f3b-91b5-80f4e09951f2","contact":{"external_id":"5d76d86b-3bb9-4d5a-b822-c9d86f5d8e4f","name":"Ryan Lewis","urn":"tel:+12024561111?channel=57f1078f-88aa-46f4-a59a-948a5739c03d","groups":[{"uuid":"b7cf0d83-f1c9-411c-96fd-c511a4cfa86d","name":"Testers"},{"uuid":"4f1f98fc-27a7-4a69-bbdb-24744ba739a9","name":"Males"}]},"custom_fields":{"country":"brazil","mood":"angry"},"flow_uuid":"50c3706e-fedb-42c0-8eab-dda3335714b7"}
{"ticket_uuid":"e7187099-7d38-4f60-955c-325957214c42","queue_uuid":"5c85fdf7-d54a-49dd-97ed-7e10077a1f6a","sector_uuid":"1a4bae05-993c-4f3b-91b5-80f4e09951f2","contact":{"external_id":"5d76d86b-3bb9-4d5a-b822-c9d86f5d8e4f","name":"Ryan Lewis","urn":"tel:+12024561111?channel=57f1078f-88aa-46f4-a59a-948a5739c03d","groups":[{"uuid":"b7cf0d83-f1c9-411c-96fd-c511a4cfa86d","name":"Testers"},{"uuid":"4f1f98fc-27a7-4a69-bbdb-24744ba739a9","name":"Males"}]},"custom_fields":{"country":"brazil","mood":"angry"},"flow_uuid":"50c3706e-fedb-42c0-8eab-dda3335714b7"}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
POST /v1/external/rooms/ HTTP/1.1
Host: chats-engine.dev.cloud.weni.ai
User-Agent: Go-http-client/1.1
Content-Length: 549
Content-Length: 602
Authorization: Bearer ****************
Content-Type: application/json
Accept-Encoding: gzip

{"queue_uuid":"5c85fdf7-d54a-49dd-97ed-7e10077a1f6a","sector_uuid":"1a4bae05-993c-4f3b-91b5-80f4e09951f2","contact":{"external_id":"5d76d86b-3bb9-4d5a-b822-c9d86f5d8e4f","name":"Ryan Lewis","urn":"tel:+12024561111?channel=57f1078f-88aa-46f4-a59a-948a5739c03d","groups":[{"uuid":"b7cf0d83-f1c9-411c-96fd-c511a4cfa86d","name":"Testers"},{"uuid":"4f1f98fc-27a7-4a69-bbdb-24744ba739a9","name":"Males"}]},"custom_fields":{"activation_****************":"AACC55","age":"23","gender":"Male","join_date":"2017-12-02"},"flow_uuid":"50c3706e-fedb-42c0-8eab-dda3335714b7"}
{"ticket_uuid":"59d74b86-3e2f-4a93-aece-b05d2fdcde0c","queue_uuid":"5c85fdf7-d54a-49dd-97ed-7e10077a1f6a","sector_uuid":"1a4bae05-993c-4f3b-91b5-80f4e09951f2","contact":{"external_id":"5d76d86b-3bb9-4d5a-b822-c9d86f5d8e4f","name":"Ryan Lewis","urn":"tel:+12024561111?channel=57f1078f-88aa-46f4-a59a-948a5739c03d","groups":[{"uuid":"b7cf0d83-f1c9-411c-96fd-c511a4cfa86d","name":"Testers"},{"uuid":"4f1f98fc-27a7-4a69-bbdb-24744ba739a9","name":"Males"}]},"custom_fields":{"activation_****************":"AACC55","age":"23","gender":"Male","join_date":"2017-12-02"},"flow_uuid":"50c3706e-fedb-42c0-8eab-dda3335714b7"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
POST /v1/external/rooms/ HTTP/1.1
Host: chats-engine.dev.cloud.weni.ai
User-Agent: Go-http-client/1.1
Content-Length: 602
Authorization: Bearer ****************
Content-Type: application/json
Accept-Encoding: gzip

{"ticket_uuid":"9688d21d-95aa-4bed-afc7-f31b35731a3d","queue_uuid":"5c85fdf7-d54a-49dd-97ed-7e10077a1f6a","sector_uuid":"1a4bae05-993c-4f3b-91b5-80f4e09951f2","contact":{"external_id":"5d76d86b-3bb9-4d5a-b822-c9d86f5d8e4f","name":"Ryan Lewis","urn":"tel:+12024561111?channel=57f1078f-88aa-46f4-a59a-948a5739c03d","groups":[{"uuid":"b7cf0d83-f1c9-411c-96fd-c511a4cfa86d","name":"Testers"},{"uuid":"4f1f98fc-27a7-4a69-bbdb-24744ba739a9","name":"Males"}]},"custom_fields":{"activation_****************":"AACC55","age":"23","gender":"Male","join_date":"2017-12-02"},"flow_uuid":"50c3706e-fedb-42c0-8eab-dda3335714b7"}

0 comments on commit ef94d33

Please sign in to comment.