Sha256: 468e1b9d3764ca256b9377c683e06bc9cae860849f68ef75126711b380530217
Contents?: true
Size: 624 Bytes
Versions: 5
Compression:
Stored size: 624 Bytes
Contents
require 'rails_helper' module Tang RSpec.describe ImportCustomersJob, type: :job do let(:stripe_helper) { StripeMock.create_test_helper } before { StripeMock.start } after { StripeMock.stop } it "imports customers from stripe" do customer = FactoryBot.create(:customer) count = Tang.customer_class.where.not(stripe_id: nil).count Stripe::Customer.create({ email: customer.email, source: stripe_helper.generate_card_token }) ImportCustomersJob.perform_now expect(Tang.customer_class.where.not(stripe_id: nil).count).to eq count + 1 end end end
Version data entries
5 entries across 5 versions & 1 rubygems