shopify_api_test.rb 563 B

123456789101112131415161718192021
  1. require 'test_helper'
  2. class ShopifyApiTest < Test::Unit::TestCase
  3. context "Session" do
  4. test "should raise error when blank shop url is provided" do
  5. assert_raise(ArgumentError) { ShopifyAPI::Session.new("") }
  6. end
  7. test "should not be valid without token" do
  8. session = ShopifyAPI::Session.new("testshop.myshopify.com")
  9. assert_not session.valid?
  10. end
  11. test "should be valid with any token" do
  12. session = ShopifyAPI::Session.new("testshop.myshopify.com", "any-token")
  13. assert session.valid?
  14. end
  15. end
  16. end