Remove Redundant Mock from Test

Christopher Vollick created

This started because Rubocop told me it didn't like OpenStruct.
Okay, whatever.

But then while writings a mock, I realized that the OpenStruct had a key
of "name", but the code looked like it was looking for a value called
"plan_name".
Weird.

With a bit more tracing it looks like the only thing this DB is used for
is `customer_plan`, and _that_ only gets called in the constructor,
which isn't being created in this test, it's being created in the setup.
And also it doesn't use the customer plan when a currency gets passed
in, since that's all it's using it for, and our tests are passing a
currency in.

So this mock was the wrong format, but that didn't matter because the
code that would have used it wasn't being run, but if it was run it'd be
run before this mock was constructed.

Change summary

test/test_credit_card_customer_gateway.rb | 1 -
1 file changed, 1 deletion(-)

Detailed changes

test/test_credit_card_customer_gateway.rb 🔗

@@ -13,7 +13,6 @@ class CreditCardCustomerGatewayTest < Minitest::Test
 
 	def test_no_cc_for_tombed
 		Customer::REDIS.expect(:get, "Tombed", ["jmp_customer_trust_level-0001"])
-		CreditCardCustomerGateway::DB.expect(:exec_params, [OpenStruct.new(name: "plan_name")])
 		assert_raises RuntimeError do
 			@gateway.sale("nonce", 1000)
 		end