Sha256: fc897d128b599cd7fcbddbae6068ffaa55592fbb2dff6857c838d66a2dc3dc06
Contents?: true
Size: 1.02 KB
Versions: 2
Compression:
Stored size: 1.02 KB
Contents
require 'spec_helper' describe Clieop do it "should test basic invoice usage" do file = Clieop::Payment::File.new file.invoice_batch({:description => 'some description', :account_nr => 123, :account_owner => 'me'}) do |batch| batch << { :account_nr => 123456, :account_owner => 'you', :amount => 133.0, :description => "Testing a CLIEOP direct debt transaction\nCharging your bank account" } batch << { :account_nr => 654321, :account_owner => 'somebody else', :amount => 233.0, :description => 'Some description for the other guy' } end clieop_data = file.to_clieop clieop_data.class.should eql(String) end it "should format the checksum" do batch = Clieop::Payment::Batch.new({:description => "Description", :account_nr => "Account Nr", :account_owner => "Account Owner" } ) batch.account_checksum('1234567890123').should eql('4567890123') batch.account_checksum('7654321').should eql('7654321') end #TODO: more tests end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
clieop-1.0.1 | spec/clieop_spec.rb |
clieop-1.0.0 | spec/clieop_spec.rb |