Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
lostman committed Nov 9, 2023
1 parent 8acdad5 commit a0f158d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ mod fuel_indexer_test {
.order_by_asc(FindEntity::value()),
)
.unwrap();
assert_eq!(&f.string_value, "find1");
assert_eq!(&f.string_value, "find2");

// Test searching for a string field
let f = FindEntity::find(
Expand Down
5 changes: 4 additions & 1 deletion packages/fuel-indexer-tests/tests/indexing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -751,8 +751,10 @@ async fn test_find() {
.collect::<Vec<u64>>();
values.sort();

assert_eq!(values, vec![1, 2, 3, 4]);
// We've triggered 3x /find above, at blocks 2, 3, 4.
assert_eq!(values, vec![2, 3, 4]);

// Trigger 2x more /find, at blocks 5, and 6.
mock_request("/find").await;
mock_request("/find").await;

Expand All @@ -765,6 +767,7 @@ async fn test_find() {
.await
.unwrap();

// Failure is expected at block 6.
assert_eq!(row.get::<&str, usize>(1), "error");
assert!(row
.get::<&str, usize>(2)
Expand Down

0 comments on commit a0f158d

Please sign in to comment.