Sha256: 1204f8b3e50aee91b93c26909e06165778e6b1b9f9122681505ec622ac391731
Contents?: true
Size: 1.17 KB
Versions: 2
Compression:
Stored size: 1.17 KB
Contents
require "spec_helper" describe 'Espago.tokens' do it "should get params from new token" do VCR.use_cassette('tokens post') do response = Espago.tokens :post, { card: { first_name: 'Jan', last_name: 'Kowalski', number: '4242424242424242', verification_value: '123', year:'2015', month:'2' }, } response.status.should eq(201) response.id.should_not eq(nil) response.used.should eq(false) response.created_at.should eq Time.at(1417029320) response.card['company'].should eq('VI') response.card['last4'].should eq('4242') response.card['authorized'].should eq(nil) end end it "should get token params" do VCR.use_cassette('tokens get') do response = Espago.tokens :get, {token_id: 'cc_166YDMhrVcemFb3'} response.status.should eq(200) response.id.should eq('cc_166YDMhrVcemFb3') response.used.should eq(false) response.created_at.should eq Time.at(1417029320) response.card['company'].should eq('VI') response.card['last4'].should eq('4242') response.card['authorized'].should eq(nil) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
espago-0.1.8 | spec/features/tokens_spec.rb |
espago-0.1.2 | spec/features/tokens_spec.rb |