Skip to content

Commit dd40735

Browse files
committed
fix test
1 parent f9b4b5a commit dd40735

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

packages/brick_offline_first/test/offline_first/helpers/__mocks__.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ class TestRepository extends OfflineFirstWithTestRepository {
8484
OfflineFirstGetPolicy? get,
8585
OfflineFirstUpsertPolicy? upsert,
8686
}) {
87-
return query?.copyWith(
88-
offset: get?.index,
89-
);
87+
return query?.copyWith(action: QueryAction.values[get?.index ?? 0]);
9088
}
9189
}
9290

packages/brick_offline_first/test/offline_first/offline_first_repository_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void main() {
2727
test('#applyPolicyToQuery', () async {
2828
const policy = OfflineFirstGetPolicy.localOnly;
2929
final query = TestRepository().applyPolicyToQuery(const Query(), get: policy);
30-
expect(query?.offset, policy.index);
30+
expect(query?.action?.index, policy.index);
3131
});
3232

3333
group('#delete', () {

0 commit comments

Comments
 (0)