Sha256: 249ac20f179bea7982a75f01570050797e7a223444b0f0dbc3c7c2aa4ee5ce8f

Contents?: true

Size: 830 Bytes

Versions: 1

Compression:

Stored size: 830 Bytes

Contents

require 'spec_helper'

describe Jackpot::Card do

  describe "#new" do
    subject { Jackpot::Card.new(credit_card_hash) }  

    it { subject.masquerade_number.should   == 'XXXX-XXXX-XXXX-4242' } 
    it { subject.number.should              == '4242424242424242'    } 
    it { subject.month.should               == 1                     } 
    it { subject.year.should                == next_year             } 
    it { subject.first_name.should          == "John"                } 
    it { subject.last_name.should           == "Doe"                 } 
    it { subject.verification_value.should  == 123                   } 
  end 


  describe ".valid?" do
    it { Jackpot::Card.new(credit_card_hash('987', :year => '2000')).should_not be_valid }
    it { Jackpot::Card.new(credit_card_hash).should be_valid }
  end 

end 

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jackpot-0.0.3 spec/models/jackpot/card_spec.rb