-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e7ecc7
commit 243acbb
Showing
3 changed files
with
143 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# frozen_string_literal: true | ||
|
||
require "helper" | ||
|
||
require "peddler/api/product_pricing_v0" | ||
|
||
module Peddler | ||
class Error | ||
class QuotaExceededTest < Minitest::Test | ||
include FeatureHelpers | ||
|
||
# I depleted quota before recording this test. | ||
def test_status | ||
error = assert_raises(QuotaExceeded) do | ||
api.get_pricing("A1F83G8C2ARO7P", "Asin", asins: ["188864544X"]) | ||
end | ||
assert_equal(429, error.cause.status) | ||
end | ||
|
||
private | ||
|
||
def api_class | ||
API::ProductPricingV0 | ||
end | ||
end | ||
end | ||
end |
112 changes: 112 additions & 0 deletions
112
test/vcr_cassettes/Peddler/Error/QuotaExceededTest/test_status.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.