Skip to content

Commit de268c2

Browse files
committed
migrate inventory test
1 parent 3b9b88f commit de268c2

File tree

3 files changed

+23
-22
lines changed

3 files changed

+23
-22
lines changed

test/square/integration/client_tests/test_catalog.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ def create_test_catalog_item(name: "Test Item #{SecureRandom.uuid}", description
5757
end
5858

5959
def get_test_file
60-
# This should return a test image file path - you'll need to implement this
61-
# For now, returning a placeholder
62-
"test/fixtures/test_image.jpg"
60+
# Return the actual test image file path
61+
"../testdata/image.jpeg"
6362
end
6463

6564
before do
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# frozen_string_literal: true
2+
3+
require_relative "../../test_helper"
4+
5+
describe Square::Inventory::Client do
6+
describe "#batch_get_changes" do
7+
it "gets inventory changes" do
8+
_request = {
9+
catalog_object_ids: ["W62UWFY35CWMYGVWK6TWJDNI"],
10+
location_ids: ["C6W5YS5QM06F5"]
11+
}
12+
13+
puts "request #{_request}" if verbose?
14+
15+
response = client.inventory.batch_get_changes(request: _request)
16+
refute_nil response
17+
18+
puts "response #{response.to_h}" if verbose?
19+
end
20+
end
21+
end

test/square/integration/inventory/test_inventory_client.rb

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)