Sha256: 09d74ab3db96049fbd3ff92f6066313e9f2757f9a8e1645414a0b86ad8a4fb88

Contents?: true

Size: 639 Bytes

Versions: 6

Compression:

Stored size: 639 Bytes

Contents

require 'spec_helper'
describe Paysio::Coupon do
  it { should be_listable_resource }
  it { should be_updatable_resource }
  it { should be_deleteable_resource }

  it "should return coupon on create" do
    client = authorized_paysio_client

    client.expects(:post).once.returns(test_response(test_coupon))
    c = Paysio::Coupon.create
    c.should be_a_kind_of(Paysio::Coupon)
  end

  it "should return coupon while checking code" do
    client = authorized_paysio_client

    client.expects(:get).once.returns(test_response(test_coupon))
    c = Paysio::Coupon.check('test_code')
    c.should be_a_kind_of(Paysio::Coupon)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
paysio-1.0.10 spec/resources/coupon_spec.rb
paysio-1.0.9 spec/resources/coupon_spec.rb
paysio-1.0.8 spec/resources/coupon_spec.rb
paysio-1.0.7 spec/resources/coupon_spec.rb
paysio-1.0.6 spec/resources/coupon_spec.rb
paysio-1.0.5 spec/resources/coupon_spec.rb