mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-05 00:02:50 -04:00
Merge pull request #668 from stripe/remi-scheduled-run-mock
Move Scheduled Query Run and Source Transaction to stripe-mock
This commit is contained in:
commit
704231a4f6
@ -18,7 +18,7 @@ sudo: false
|
||||
env:
|
||||
global:
|
||||
# If changing this number, please also change it in `test/test_helper.rb`.
|
||||
- STRIPE_MOCK_VERSION=0.23.0
|
||||
- STRIPE_MOCK_VERSION=0.24.1
|
||||
|
||||
cache:
|
||||
directories:
|
||||
|
@ -6,9 +6,6 @@ module Stripe
|
||||
module Issuing
|
||||
class ScheduledQueryRunTest < Test::Unit::TestCase
|
||||
should "be listable" do
|
||||
stub_request(:get, "#{Stripe.api_base}/v1/sigma/scheduled_query_runs")
|
||||
.to_return(body: JSON.generate(object: "list", data: [{ id: "sqr_123", object: "scheduled_query_run" }]))
|
||||
|
||||
runs = Stripe::Sigma::ScheduledQueryRun.list
|
||||
assert_requested :get, "#{Stripe.api_base}/v1/sigma/scheduled_query_runs"
|
||||
assert runs.data.is_a?(Array)
|
||||
@ -16,8 +13,6 @@ module Stripe
|
||||
end
|
||||
|
||||
should "be retrievable" do
|
||||
stub_request(:get, "#{Stripe.api_base}/v1/sigma/scheduled_query_runs/sqr_123")
|
||||
.to_return(body: JSON.generate(id: "sqr_123", object: "scheduled_query_run"))
|
||||
run = Stripe::Sigma::ScheduledQueryRun.retrieve("sqr_123")
|
||||
assert_requested :get, "#{Stripe.api_base}/v1/sigma/scheduled_query_runs/sqr_123"
|
||||
assert run.is_a?(Stripe::Sigma::ScheduledQueryRun)
|
||||
|
@ -9,17 +9,6 @@ module Stripe
|
||||
end
|
||||
|
||||
should "be listable" do
|
||||
# TODO: remove the stub once stripe-mock supports /v1/sources/src_.../source_transactions
|
||||
stub_request(:get, "#{Stripe.api_base}/v1/sources/#{@source.id}/source_transactions")
|
||||
.to_return(body: JSON.generate(
|
||||
object: "list",
|
||||
data: [
|
||||
{
|
||||
object: "source_transaction",
|
||||
},
|
||||
]
|
||||
))
|
||||
|
||||
transactions = @source.source_transactions
|
||||
|
||||
assert_requested :get, "#{Stripe.api_base}/v1/sources/#{@source.id}/source_transactions"
|
||||
|
@ -16,7 +16,7 @@ PROJECT_ROOT = File.expand_path("../../", __FILE__)
|
||||
require File.expand_path("../test_data", __FILE__)
|
||||
|
||||
# If changing this number, please also change it in `.travis.yml`.
|
||||
MOCK_MINIMUM_VERSION = "0.23.0".freeze
|
||||
MOCK_MINIMUM_VERSION = "0.24.1".freeze
|
||||
MOCK_PORT = ENV["STRIPE_MOCK_PORT"] || 12_111
|
||||
|
||||
# Disable all real network connections except those that are outgoing to
|
||||
|
Loading…
x
Reference in New Issue
Block a user