@@ 4,6 4,19 @@ require "test_helper"
require "registration"
class RegistrationTest < Minitest::Test
+ def test_for_registered
+ BACKEND_SGX.expect(
+ :registered?,
+ EMPromise.resolve(OpenStruct.new(phone: "+15555550000")),
+ ["test"]
+ )
+ iq = Blather::Stanza::Iq::Command.new
+ iq.from = "test@example.com"
+ result = Registration.for(iq, Customer.new("test"), Minitest::Mock.new).sync
+ assert_kind_of Registration::Registered, result
+ end
+ em :test_for_registered
+
def test_for_activated
BACKEND_SGX.expect(
:registered?,