~singpolyma/sgx-jmp

fd9d0c253c295f67e4533e2bfbdb1c25914813d3 — Stephen Paul Weber a day ago 9558f36 master
This is not a single result
3 files changed, 15 insertions(+), 15 deletions(-)

M lib/subaccount.rb
M test/test_admin_command.rb
M test/test_customer_info.rb
M lib/subaccount.rb => lib/subaccount.rb +1 -1
@@ 10,7 10,7 @@ class Subaccount
	end

	def self.get_subaccounts(parent_id)
		DB.query_one(<<~SQL, parent_id)
		DB.query_defer(<<~SQL, [parent_id])
			SELECT customer_id FROM customer_plans WHERE parent_customer_id=$1
	  SQL
			.then { |rows| rows.map { |customer_id| Subaccount.new(customer_id) } }

M test/test_admin_command.rb => test/test_admin_command.rb +3 -3
@@ 71,9 71,9 @@ class AdminCommandTest < Minitest::Test
			)

			Subaccount::DB.expect(
				:query_one,
				EMPromise.resolve({}),
				[String, "testuser"]
				:query_defer,
				EMPromise.resolve([]),
				[String, ["testuser"]]
			)

			Command::COMMAND_MANAGER.expect(

M test/test_customer_info.rb => test/test_customer_info.rb +11 -11
@@ 120,9 120,9 @@ class CustomerInfoTest < Minitest::Test
		)

		Subaccount::DB.expect(
			:query_one,
			:query_defer,
			EMPromise.resolve({}),
			[String, "test"]
			[String, ["test"]]
		)

		cust = customer(sgx: sgx, plan_name: "test_usd")


@@ 156,9 156,9 @@ class CustomerInfoTest < Minitest::Test
		)

		Subaccount::DB.expect(
			:query_one,
			EMPromise.resolve({}),
			[String, "test"]
			:query_defer,
			EMPromise.resolve([]),
			[String, ["test"]]
		)

		cust = customer(sgx: sgx, plan_name: "test_usd")


@@ 208,9 208,9 @@ class CustomerInfoTest < Minitest::Test
		sgx.expect(:fwd, CustomerFwd::None.new(uri: nil, timeout: nil))

		Subaccount::DB.expect(
			:query_one,
			EMPromise.resolve({}),
			[String, "test"]
			:query_defer,
			EMPromise.resolve([]),
			[String, ["test"]]
		)

		plan = CustomerPlan.new("test", plan: nil, expires_at: nil)


@@ 251,9 251,9 @@ class CustomerInfoTest < Minitest::Test
		)

		Subaccount::DB.expect(
			:query_one,
			EMPromise.resolve({}),
			[String, "parent"]
			:query_defer,
			EMPromise.resolve([]),
			[String, ["parent"]]
		)

		cust = customer(