~singpolyma/sgx-jmp

ref: 6665370def4be4097eda0de37d29c288954936ed sgx-jmp/test/test_plan.rb -rw-r--r-- 489 bytes
6665370dStephen Paul Weber No low balance if not registered 1 year, 6 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
24
25
26
# frozen_string_literal: true

require "test_helper"
require "plan"

class PlanTest < Minitest::Test
	def test_for_non_existing
		assert_raises do
			Plan.for("non_existing")
		end
	end

	def test_currency
		assert_equal :USD, Plan.for("test_usd").currency
	end

	def test_merchant_account
		assert_equal "merchant_usd", Plan.for("test_usd").merchant_account
	end

	def test_merchant_account_bad_currency
		assert_raises do
			Plan.for("test_bad_currency").merchant_account
		end
	end
end