Skip to content

Commit 8459256

Browse files
committed
Add tests to check user answer
1 parent 45cb37e commit 8459256

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/ussd_pulse_survey_rapidpro.test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ describe("ussd_pulse_survey app", function() {
195195
return tester.setup.user
196196
.state("state_customer_satisfaction")
197197
.input("1")
198+
.check.user.answers({
199+
state_customer_satisfaction: "very_dissatisfied",
200+
"wa_pulse_survey_started": "Yes"
201+
})
198202
.check.interaction({
199203
state: "state_csat_lower",
200204
reply: [
@@ -215,6 +219,10 @@ describe("ussd_pulse_survey app", function() {
215219
return tester.setup.user
216220
.state("state_customer_satisfaction")
217221
.input("5")
222+
.check.user.answers({
223+
state_customer_satisfaction: "very_satisfied",
224+
"wa_pulse_survey_started": "Yes"
225+
})
218226
.check.interaction({
219227
state: "state_tas",
220228
reply: [
@@ -232,6 +240,9 @@ describe("ussd_pulse_survey app", function() {
232240
return tester.setup.user
233241
.state("state_tas")
234242
.input("1")
243+
.check.user.answers({
244+
state_tas: "strongly_disagree"
245+
})
235246
.check.interaction({
236247
state: "state_tas_lower",
237248
reply: [

0 commit comments

Comments
 (0)