shopify_api_test.rb 565 B

123456789101112131415161718192021
  1. require 'test_helper'
  2. class ShopifyApiTest < Test::Unit::TestCase
  3. context "Session" do
  4. should "not be valid without a url" do
  5. session = ShopifyAPI::Session.new(nil, "any-token")
  6. assert_not session.valid?
  7. end
  8. should "not be valid without token" do
  9. session = ShopifyAPI::Session.new("testshop.myshopify.com")
  10. assert_not session.valid?
  11. end
  12. should "be valid with any token and any url" do
  13. session = ShopifyAPI::Session.new("testshop.myshopify.com", "any-token")
  14. assert session.valid?
  15. end
  16. end
  17. end