Skip to content

Commit

Permalink
Added tests for application, business name and address and support email
Browse files Browse the repository at this point in the history
  • Loading branch information
excid3 committed Jan 22, 2019
1 parent 3b0a01d commit 076def8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/pay.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ module Pay
mattr_accessor :subscription_class
@@subscription_class = 'Pay::Subscription'

mattr_accessor :business_name
# Business details for receipts
mattr_accessor :application_name
mattr_accessor :business_address
mattr_accessor :business_name
mattr_accessor :support_email

# Email configuration
mattr_accessor :send_emails
@@send_emails = true

Expand Down
20 changes: 20 additions & 0 deletions test/pay_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,24 @@ class Pay::Test < ActiveSupport::TestCase
test 'default chargeable table is charges' do
assert Pay.chargeable_table, 'charges'
end

test 'can set business name' do
assert Pay.respond_to?(:business_name)
assert Pay.respond_to?(:business_name=)
end

test 'can set business address' do
assert Pay.respond_to?(:business_address)
assert Pay.respond_to?(:business_address=)
end

test 'can set application name' do
assert Pay.respond_to?(:application_name)
assert Pay.respond_to?(:application_name=)
end

test 'can set support email' do
assert Pay.respond_to?(:support_email)
assert Pay.respond_to?(:support_email=)
end
end

0 comments on commit 076def8

Please sign in to comment.