Last active
August 29, 2015 14:20
-
-
Save joeljackson/be9e39544a85f7cc2a78 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe Scheduled::ChaseCardUpdateRequestJob do | |
describe "#execute" do | |
before do | |
orders | |
Scheduled::ChaseCardUpdateRequestJob.new.execute | |
end | |
memoized_context "Order being shipped in the next 10 days that needs an updated card" do | |
let(:orders){ | |
[ | |
FactoryGirl.create(:order, :ships_in_two_business_days, :essentials_bundle, :with_chase) | |
] | |
} | |
testing_group "First order's credit_card" do | |
subject { orders.first.credit_card } | |
its("transactions.length"){ should eq 1 } | |
end | |
testing_group "First order's credit_card's first transction" do | |
subject { orders.first.credit_card.transactions.first } | |
it { should be } | |
its(:human_readable_type) { should eq :account_updater } | |
its(:status) { should eq :marked } | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment