Skip to content

Commit 963bd2b

Browse files
committed
fix(datastore): delete test fix (#1880)
1 parent 8af4b65 commit 963bd2b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/amplify_datastore/example/integration_test/delete_test.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ void main() {
3535
const originalBlogName = 'non matching blog';
3636
Blog testBlog = Blog(name: originalBlogName);
3737
await Amplify.DataStore.save(testBlog);
38-
39-
await Amplify.DataStore.delete(testBlog,
40-
where: Blog.NAME.contains("Predicate"));
38+
expect(
39+
Amplify.DataStore.delete(testBlog,
40+
where: Blog.NAME.contains("Predicate")),
41+
throwsA(isA<DataStoreException>()),
42+
);
4143
var blogs = await Amplify.DataStore.query(Blog.classType);
4244
expect(blogs.length, 1);
4345
expect(blogs[0].name, originalBlogName);

0 commit comments

Comments
 (0)