~singpolyma/sgx-jmp

ref: 94b7b998d195a73afe638a3d9da926edd402e0b5 sgx-jmp/test/test_web_register_manager.rb -rw-r--r-- 594 bytes
94b7b998Stephen Paul Weber hotfix 1 year, 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

require "test_helper"
require "web_register_manager"

class WebRegisterManagerTest < Minitest::Test
	def setup
		@manager = WebRegisterManager.new
	end

	def test_set_get
		assert_kind_of WebRegisterManager::ChooseTel, @manager["jid@example.com"]
		@manager["jid@example.com"] = "+15555550000"
		assert_kind_of WebRegisterManager::HaveTel, @manager["jid@example.com"]
	end

	def test_choose_tel_have_tel
		jid = "jid@example.com"
		@manager[jid] = "+15555550000"
		assert_equal "+15555550000", @manager[jid].choose_tel.sync
	end
	em :test_choose_tel_have_tel
end