Skip to content

Commit fb0c549

Browse files
fix(integration): fix collection access patterns and invalid search type
- Use items.data.first/each instead of items.first/each on WebsetItemCollection struct - Assert WebsetItemCollection type instead of Array for list_items result - Change type: "neural" to type: "auto" (neural is not a valid search type)
1 parent 7082faa commit fb0c549

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

test/integration/search_integration_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def test_search_with_multiple_features_combined
208208

209209
result = client.search(
210210
"artificial intelligence",
211-
type: "neural",
211+
type: "auto",
212212
num_results: 5,
213213
start_published_date: "2025-01-01T00:00:00.000Z",
214214
end_published_date: "2025-12-31T23:59:59.999Z",

test/integration/websets_enrichments_integration_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def test_enrichment_values_populated_on_items
315315
skip "No items in webset" if items.nil? || items.empty?
316316

317317
# Verify items have enrichment values
318-
first_item = items.first
318+
first_item = items.data.first
319319
assert first_item.key?("id")
320320
assert first_item.key?("properties")
321321

test/integration/websets_items_integration_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ def test_list_items
101101
# List all items in the webset
102102
items = client.list_items(webset_id: webset.id)
103103

104-
assert_instance_of Array, items
104+
assert_instance_of Exa::Resources::WebsetItemCollection, items
105105
refute_empty items
106-
items.each do |item|
106+
items.data.each do |item|
107107
assert item.key?("id")
108108
# Items have a nested properties structure with the URL
109109
assert item.key?("properties")

0 commit comments

Comments
 (0)