Skip to content

Commit b59e028

Browse files
committed
Add test for canceling a completed job
1 parent c52d00d commit b59e028

2 files changed

Lines changed: 110 additions & 0 deletions

File tree

spec/fixtures/cassettes/ShopifyAPI_GraphQL_Bulk/_cancel/raises_an_error_when_the_result_cannot_be_canceled.yml

Lines changed: 104 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/shopify_api/graphql/bulk_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@
8686
)
8787
end
8888

89+
it "raises an error when the result cannot be canceled" do
90+
expect {
91+
subject.cancel(ENV.fetch("BULK_SUCCESS_ID"))
92+
}.to raise_error(ShopifyAPI::GraphQL::Bulk::Error, /cancel request failed/)
93+
end
94+
8995
# TODO
9096
# it "returns an Operation with the parsed partial result data" do
9197
# end

0 commit comments

Comments
 (0)