Sha256: 4dc6adad50fbddf586a0dcb61b1f52760aa2c4010d53748b05b16b300eef7e70
Contents?: true
Size: 760 Bytes
Versions: 3
Compression:
Stored size: 760 Bytes
Contents
require 'spec_helper' module SpreeSignifyd describe CreditCardSerializer do let(:credit_card) { create(:credit_card) } let(:serialized_credit_card) { JSON.parse(CreditCardSerializer.new(credit_card).to_json) } context "node values" do it "cardHolderName" do expect(serialized_credit_card['cardHolderName']).to eq "#{credit_card.first_name} #{credit_card.last_name}" end it "last4" do expect(serialized_credit_card['last4']).to eq credit_card.last_digits end it "expiryMonth" do expect(serialized_credit_card['expiryMonth']).to eq credit_card.month end it "expiryYear" do expect(serialized_credit_card['expiryYear']).to eq credit_card.year end end end end
Version data entries
3 entries across 3 versions & 1 rubygems