Permalink
Browse files

Adding more test coverage for the subdomain

  • Loading branch information...
shayfrendt committed Oct 20, 2011
1 parent 0196e62 commit f88db58d9f8eb39198c9c192e9a5c31d39362fb0
Showing with 16 additions and 0 deletions.
  1. +16 −0 spec/base_spec.rb
View
@@ -20,6 +20,22 @@
end.to change { Chargify::Base.site.to_s }.to("https://something-new.chargify.com")
end
+ it "honors changes made to the subdomain" do
+ Chargify.configure do |c|
+ c.subdomain = "grizzly-bear"
+ c.api_key = "abc123"
+ end
+
+ Chargify.site.should == "https://grizzly-bear.chargify.com"
+
+ Chargify.configure do |c|
+ c.subdomain = "zebra"
+ c.api_key = "abc123"
+ end
+
+ Chargify.site.should == "https://zebra.chargify.com"
+ end
+
it "honors the site over the subdomain if it is specified" do
expect do
Chargify.configure do |c|

0 comments on commit f88db58

Please sign in to comment.