Skip to content

Commit

Permalink
Use .com domains in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Hammadk committed Apr 10, 2017
1 parent bd4f178 commit 442d9d2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/controllers/sessions_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class SessionsControllerTest < ActionController::TestCase

teardown do
ShopifyApp.configuration.embedded_app = true
ShopifyApp.configuration.myshopify_domain = 'myshopify.com'
end

test "#new should authenticate the shop if a valid shop param exists" do
Expand Down
1 change: 1 addition & 0 deletions test/dummy/config/initializers/shopify_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
config.secret = "secret"
config.scope = 'read_orders, read_products'
config.embedded_app = true
config.myshopify_domain = 'myshopify.com'
end
1 change: 1 addition & 0 deletions test/shopify_app/configuration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class ConfigurationTest < ActiveSupport::TestCase

teardown do
Rails.application.config.active_job.queue_name = nil
ShopifyApp.configuration.myshopify_domain = 'myshopify.com'
end

test "configure" do
Expand Down
4 changes: 4 additions & 0 deletions test/shopify_app/utils_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ class UtilsTest < ActiveSupport::TestCase
ShopifyApp.configuration = nil
end

teardown do
ShopifyApp.configuration.myshopify_domain = 'myshopify.com'
end

['my-shop', 'my-shop.myshopify.com', 'https://my-shop.myshopify.com', 'http://my-shop.myshopify.com'].each do |good_url|
test "sanitize_shop_domain for (#{good_url})" do
ShopifyApp.configuration.embedded_app = true
Expand Down

0 comments on commit 442d9d2

Please sign in to comment.