diff --git a/services/tickets/wenichats/service_test.go b/services/tickets/wenichats/service_test.go index 1d6eb3c66..8feded955 100644 --- a/services/tickets/wenichats/service_test.go +++ b/services/tickets/wenichats/service_test.go @@ -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) diff --git a/services/tickets/wenichats/testdata/TestOpenAndForward_open_ticket.snap b/services/tickets/wenichats/testdata/TestOpenAndForward_open_ticket.snap index 862bf15eb..ec0d0b1b3 100644 --- a/services/tickets/wenichats/testdata/TestOpenAndForward_open_ticket.snap +++ b/services/tickets/wenichats/testdata/TestOpenAndForward_open_ticket.snap @@ -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"} \ No newline at end of file +{"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"} \ No newline at end of file diff --git a/services/tickets/wenichats/testdata/TestOpenAndForward_open_ticket_empty_body.snap b/services/tickets/wenichats/testdata/TestOpenAndForward_open_ticket_empty_body.snap index 38b6ad482..7326b4c00 100644 --- a/services/tickets/wenichats/testdata/TestOpenAndForward_open_ticket_empty_body.snap +++ b/services/tickets/wenichats/testdata/TestOpenAndForward_open_ticket_empty_body.snap @@ -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"} \ No newline at end of file +{"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"} \ No newline at end of file diff --git a/services/tickets/wenichats/testdata/TestOpenAndForward_open_ticket_history_after.snap b/services/tickets/wenichats/testdata/TestOpenAndForward_open_ticket_history_after.snap new file mode 100644 index 000000000..875ed6205 --- /dev/null +++ b/services/tickets/wenichats/testdata/TestOpenAndForward_open_ticket_history_after.snap @@ -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"} \ No newline at end of file