Skip to content

Commit

Permalink
Add test case for using ticket/assign endpoint to unassign
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Jul 5, 2021
1 parent d034a79 commit 85348d2
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion web/ticket/testdata/assign.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"label": "assigns the given tickets",
"label": "assigns the given tickets to the given user",
"method": "POST",
"path": "/mr/ticket/assign",
"body": {
Expand Down Expand Up @@ -31,5 +31,34 @@
"count": 2
}
]
},
{
"label": "unassigns the given tickets if user is null",
"method": "POST",
"path": "/mr/ticket/assign",
"body": {
"org_id": 1,
"user_id": 3,
"ticket_ids": [
1
],
"assignee_id": null
},
"status": 200,
"response": {
"changed_ids": [
1
]
},
"db_assertions": [
{
"query": "SELECT count(*) FROM tickets_ticket WHERE id = 1 AND assignee_id IS NULL",
"count": 1
},
{
"query": "SELECT count(*) FROM tickets_ticketevent WHERE event_type = 'A' AND created_by_id = 3",
"count": 3
}
]
}
]

0 comments on commit 85348d2

Please sign in to comment.