Adds first rudimentary test for account creation.

This commit is contained in:
PhilipWafula 2021-03-30 04:48:31 +03:00
parent 071cbcc6fb
commit 71e864695b
Signed by untrusted user: mango-habanero
GPG Key ID: B00CE9034DA19FB7
1 changed files with 15 additions and 0 deletions

View File

@ -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" }