Created
August 29, 2014 15:27
-
-
Save imsickofmaps/39c68bc71b1182f38679 to your computer and use it in GitHub Desktop.
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
describe("T5.b When the user chooses to Send by SMS after page 2", function() { | |
it("should thank the user, send sms, and exit", function() { | |
return tester | |
.setup.user.state('states_questions', { | |
creator_opts: { | |
faq_id: 1 | |
} | |
}) | |
.setup.user.answers({'states_topics': '52'}) | |
.inputs('3', '1', '1', '1', '2') | |
.check.interaction({ | |
state: 'states_end', | |
reply: ('Thank you. Your SMS will be delivered shortly.') | |
}) | |
.check(function(api) { | |
var smses = _.where(api.outbound.store, { | |
endpoint: 'sms' | |
}); | |
var sms = smses[0]; | |
// assert.equal(smses.length, 1); | |
assert.equal(sms.content, | |
"It will be split into multiple pages on a bookletstate, showing " + | |
"content on different screens as the text gets too long. To " + | |
"illustrate this, this super long response has been faked. This " + | |
"should be split over at least 2 screens just because we want to " + | |
"test properly. Let\'s see." | |
); | |
}) | |
.check.reply.ends_session() | |
.run(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment