Sha256: 884a96c3a99909b97040afe2297ff326c01b7e03615d1c77f8ca88cf9541dbd8

Contents?: true

Size: 803 Bytes

Versions: 16

Compression:

Stored size: 803 Bytes

Contents

require 'spec_helper'

describe SiebelDonations::Donation do
  context '.find' do
    context 'by a designation number' do
      it "returns an array of donations" do
        donation_json = Oj.load '[ { "id": "XGF5T", "amount": "10.00", "designation": "0588176", "donorId": "000599596", "donationDate": "2007-10-21", "paymentMethod": "Credit Card", "paymentType": "Visa", "channel": "Recurring", "campaignCode": "CCWBST" } ]'
        SiebelDonations::Donation.should_receive(:get).and_return(donation_json)

        donations = SiebelDonations::Donation.find(designations: '0559826',
                                                   start_date: '2012-01-01',
                                                   end_date: '2013-01-01')

        donations.length.should == 1
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
siebel_donations-1.0.15 spec/donation_spec.rb
siebel_donations-1.0.14 spec/donation_spec.rb
siebel_donations-1.0.13 spec/donation_spec.rb
siebel_donations-1.0.12 spec/donation_spec.rb
siebel_donations-1.0.11 spec/donation_spec.rb
siebel_donations-1.0.10 spec/donation_spec.rb
siebel_donations-1.0.9 spec/donation_spec.rb
siebel_donations-1.0.8 spec/donation_spec.rb
siebel_donations-1.0.7 spec/donation_spec.rb
siebel_donations-1.0.6 spec/donation_spec.rb
siebel_donations-1.0.5 spec/donation_spec.rb
siebel_donations-1.0.4 spec/donation_spec.rb
siebel_donations-1.0.3 spec/donation_spec.rb
siebel_donations-1.0.2 spec/donation_spec.rb
siebel_donations-1.0.1 spec/donation_spec.rb
siebel_donations-1.0.0 spec/donation_spec.rb