From 71e864695b6b5b7c77f3d8ebac53180afc84d561 Mon Sep 17 00:00:00 2001 From: PhilipWafula Date: Tue, 30 Mar 2021 04:48:31 +0300 Subject: [PATCH] Adds first rudimentary test for account creation. --- apps/cic-ussd/expect/account_tests.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 apps/cic-ussd/expect/account_tests.yml diff --git a/apps/cic-ussd/expect/account_tests.yml b/apps/cic-ussd/expect/account_tests.yml new file mode 100644 index 00000000..26094ee3 --- /dev/null +++ b/apps/cic-ussd/expect/account_tests.yml @@ -0,0 +1,15 @@ +- config: + - testset: "Test account creation sequence" + +- test: + - group: "Accounts" + - name: "First dial in" + - url: "/" + - method: "POST" + - body: '{"serviceCode": "*483*46#", "phoneNumber": "+2547876545", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek000", "text": ""}' + - headers: {'Content-Type': 'application/json'} + - expected_status: [200] + - validators: + - compare: {"header": "content-type", "comparator": "str_eq", "expected":"text/plain"} + - compare: {"header": "content-length", "comparator": "str_eq", "expected":"175"} + - compare: {"raw_body":"", "comparator":"contains", expected: "END Your account is being created. You will receive an SMS when your account is ready.\nAkaunti yako ya Sarafu inatayarishwa. Utapokea ujumbe wa SMS akaunti yako ikiwa tayari.\n" }