-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(solidarity): adds getStatus func to assign correct status to sup…
…port request
- Loading branch information
Viviane Dias
committed
Dec 7, 2023
1 parent
bf9209e
commit 9e04063
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
packages/listener-solidarity/src/utils/__tests__/getStatus.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { getStatus } from "../getSupportRequests"; | ||
|
||
describe("getStatus", () => { | ||
it("should return 'open' if zendeskStatus is an empty string", () => { | ||
expect(getStatus("")).toStrictEqual("open"); | ||
}); | ||
|
||
it("should return 'open' if zendeskStatus is not found in newStatus key/value pair", () => { | ||
expect(getStatus("encaminhamento__realizado")).toStrictEqual("open"); | ||
}); | ||
|
||
it("should return 'open' if zendeskStatus is 'solicitacao_recebida'", () => { | ||
expect(getStatus("solicitação_recebida")).toStrictEqual("open"); | ||
}); | ||
|
||
it("should return 'duplicated' if zendeskStatus is 'solicitação_repetida'", () => { | ||
expect(getStatus("solicitação_repetida")).toStrictEqual("duplicated"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters