Sha256: e1ba7c54b49ad318eb8d99e5d8271c104921b296c05c58defcd1cd4e91db3e77

Contents?: true

Size: 1.12 KB

Versions: 11

Compression:

Stored size: 1.12 KB

Contents

# frozen_string_literal: true

require ::File.expand_path("../../test_helper", __FILE__)

module Stripe
  class SubscriptionScheduleRevisionTest < Test::Unit::TestCase
    context "#resource_url" do
      should "return a resource URL" do
        revision = Stripe::SubscriptionScheduleRevision.construct_from(
          id: "sub_sched_rev_123",
          schedule: "sub_sched_123"
        )
        assert_equal "/v1/subscription_schedules/sub_sched_123/revisions/sub_sched_rev_123",
                     revision.resource_url
      end

      should "raise without a subscription schedule" do
        revision = Stripe::SubscriptionScheduleRevision.construct_from(id: "sub_sched_rev_123")
        assert_raises NotImplementedError do
          revision.resource_url
        end
      end
    end

    should "raise on #retrieve" do
      assert_raises NotImplementedError do
        Stripe::SubscriptionScheduleRevision.retrieve("sub_sched_rev_123")
      end
    end

    should "raise on #list" do
      assert_raises NotImplementedError do
        Stripe::SubscriptionScheduleRevision.list("sub_sched_rev_123", {})
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
stripe-4.18.0 test/stripe/subscription_schedule_revision_test.rb
stripe-4.17.0 test/stripe/subscription_schedule_revision_test.rb
stripe-4.16.0 test/stripe/subscription_schedule_revision_test.rb
stripe-4.15.0 test/stripe/subscription_schedule_revision_test.rb
stripe-4.14.0 test/stripe/subscription_schedule_revision_test.rb
stripe-4.13.0 test/stripe/subscription_schedule_revision_test.rb
stripe-4.12.0 test/stripe/subscription_schedule_revision_test.rb
stripe-4.11.0 test/stripe/subscription_schedule_revision_test.rb
stripe-4.10.0 test/stripe/subscription_schedule_revision_test.rb
stripe-4.9.1 test/stripe/subscription_schedule_revision_test.rb
stripe-4.9.0 test/stripe/subscription_schedule_revision_test.rb