~singpolyma/sgx-jmp

691c8b95f7a5e5c0e100dbd00ca2e876947ac00a — Stephen Paul Weber 2 years ago 100e003
Allow prev from credit card form
2 files changed, 5 insertions(+), 3 deletions(-)

M lib/registration.rb
M test/test_registration.rb
M lib/registration.rb => lib/registration.rb +4 -2
@@ 255,11 255,13 @@ class Registration

			def write
				Command.reply { |reply|
					reply.allowed_actions = [:next]
					reply.allowed_actions = [:next, :prev]
					toob = oob(reply)
					reply.note_type = :info
					reply.note_text = "#{toob.desc}: #{toob.url}"
				}.then do
				}.then do |iq|
					next Activation.for(@customer, @tel).then(&:write) if iq.prev?

					CreditCard.for(@customer, @tel, finish: @finish).then(&:write)
				end
			end

M test/test_registration.rb => test/test_registration.rb +1 -1
@@ 391,7 391,7 @@ class RegistrationTest < Minitest::Test
						:write,
						EMPromise.reject(:test_result),
						[Matching.new do |reply|
							assert_equal [:execute, :next], reply.allowed_actions
							assert_equal [:execute, :next, :prev], reply.allowed_actions
							assert_equal(
								"Add credit card, then return here to continue: " \
								"http://creditcard.example.com",