Sha256: c9d9bf0b086c18841d59fba5ba7b37ad577a0563988c9c72bbfc527f208572ea

Contents?: true

Size: 540 Bytes

Versions: 9

Compression:

Stored size: 540 Bytes

Contents

# frozen_string_literal: true
require 'test_helper'

class GiftCardTest < Test::Unit::TestCase
  def setup
    super
    load_gift_card
  end

  def test_disable
    fake('gift_cards/1023670/disable.json', body: load_fixture('gift_card_disabled'), method: :post, extension: false)

    refute(@gift_card.disabled_at)
    @gift_card.disable
    assert(@gift_card.disabled_at)
  end

  private

  def load_gift_card
    fake('gift_cards/1023670', body: load_fixture('gift_card'))
    @gift_card = ShopifyAPI::GiftCard.find(1023670)
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
shopify_api-9.5.2 test/gift_card_test.rb
ruby_shopify_api-1.2.0 test/gift_card_test.rb
ruby_shopify_api-1.1.0 test/gift_card_test.rb
ruby_shopify_api-1.0.0 test/gift_card_test.rb
shopify_api-9.5.1 test/gift_card_test.rb
shopify_api-9.5 test/gift_card_test.rb
shopify_api-9.4.1 test/gift_card_test.rb
shopify_api-9.4.0 test/gift_card_test.rb
shopify_api-9.3.0 test/gift_card_test.rb