~singpolyma/sgx-jmp

ref: 934772529eecfb46e4a879824cec6e43e4872fce sgx-jmp/test/test_plan.rb -rw-r--r-- 489 bytes
93477252Stephen Paul Weber Customer always has a JID 2 years 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