Skip to content

Commit c1250ba

Browse files
committed
Fixed test not using transaction object.
1 parent 95adf91 commit c1250ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/drizzle-driver/tests/sqlite/db.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe('Database operations', () => {
5353
it('should insert a user and update that user within a transaction when raw sql is used', async () => {
5454
await db.transaction(async (transaction) => {
5555
await transaction.run(sql`INSERT INTO users (id, name) VALUES ('4', 'James');`);
56-
await db.update(drizzleUsers).set({ name: 'James Smith' }).where(eq(drizzleUsers.name, 'James'));
56+
await transaction.update(drizzleUsers).set({ name: 'James Smith' }).where(eq(drizzleUsers.name, 'James'));
5757
});
5858

5959
const result = await db.select().from(drizzleUsers).get();

0 commit comments

Comments
 (0)