Sha256: fda91b8dbf74782a1d203e68ec4f6e68825d3d42d57bda020eaef9167cd748c7

Contents?: true

Size: 546 Bytes

Versions: 3

Compression:

Stored size: 546 Bytes

Contents

require 'test_helper'

class ShopifyApiTest < Test::Unit::TestCase
  
  context "Session" do
    should "raise error when blank shop url is provided" do
      assert_raise(ArgumentError) { ShopifyAPI::Session.new("") }
    end

    should "not be valid without token" do
      session = ShopifyAPI::Session.new("testshop.myshopify.com")
      assert_not session.valid?
    end

    should "be valid with any token" do
      session = ShopifyAPI::Session.new("testshop.myshopify.com", "any-token")
      assert session.valid?
    end
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
shopify_api-1.0.2 test/shopify_api_test.rb
shopify_api-1.0.1 test/shopify_api_test.rb
shopify_api-1.0.0 test/shopify_api_test.rb