Sha256: e0ab0a1febe63d238cce0ef16ac867ad3d04d4669af49f085a06673eb284c6ff
Contents?: true
Size: 913 Bytes
Versions: 2
Compression:
Stored size: 913 Bytes
Contents
require "spec_helper" require "espago/back_request" require "json" describe Espago::BackRequest do subject { Espago::BackRequest.new(response)} let(:response) { {"id"=>"in_tUCMhwlg2nkvAaL", "date"=>"1417030496", "client"=>"cli_90Pi6Jf0ndl_PP", "subscription"=>"sub_8yYuCBKdywr7e2", "amount"=>"123.45", "currency"=>"pln", "paid"=>"true", "issuer_response_code"=>"00", "attempts"=>"1", "next_payment_attempt"=>"", "created_at"=>1417030497 } } its(:id) { should eq("in_tUCMhwlg2nkvAaL") } its(:subscription) { should eq("sub_8yYuCBKdywr7e2") } its(:amount) { should eq("123.45") } its(:currency) { should eq("pln") } its(:paid) { should eq("true") } its(:client) { should eq("cli_90Pi6Jf0ndl_PP") } its(:created_at) { should eq(Time.at(1417030497)) } its(:card) { should eq({}) } its(:imaginated_attribute) { should be_nil } end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
espago-0.1.8 | spec/espago/back_request_spec.rb |
espago-0.1.2 | spec/espago/back_request_spec.rb |