Skip to content

Commit

Permalink
Fix issue creating production receivers
Browse files Browse the repository at this point in the history
  • Loading branch information
duff committed Apr 28, 2015
1 parent 37eb62e commit 6b2505d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Add support for the store API call [duff]
* Add support for company name property on credit card [duff]
* Deliver payment method uses talking to gateway timeout [duff]
* Fix issue creating production receiver [duff]

## 2.0.14
* Add support for gateway_specific_fields [duff]
Expand Down
2 changes: 1 addition & 1 deletion lib/spreedly/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def add_gateway_body(gateway_type, credentials)
def add_receiver_body(receiver_type, host_names, credentials)
build_xml_request('receiver') do |doc|
doc.receiver_type receiver_type
doc.hostnames host_names
doc.hostnames(host_names) if host_names
add_credentials_to_doc(doc, credentials) if credentials && !credentials.empty?
end
end
Expand Down
11 changes: 5 additions & 6 deletions test/remote/remote_add_receiver_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ def test_add_test_receiver
assert_equal 'http://testserver.com', receiver.hostnames
end

# Coming soon
# def test_need_active_account
# assert_raise_with_message(Spreedly::PaymentRequiredError, "Your account has not been activated for real transactions. Please update your subscription settings.") do
# @environment.add_receiver(:braintree)
# end
# end
def test_need_active_account
assert_raise_with_message(Spreedly::PaymentRequiredError, "Your account has not been activated for real transactions. Please update your subscription settings.") do
@environment.add_receiver(:braintree)
end
end

end

0 comments on commit 6b2505d

Please sign in to comment.