Skip to content

Commit 4bcbb13

Browse files
committed
chore: remove old tests
1 parent 02015fa commit 4bcbb13

1 file changed

Lines changed: 0 additions & 62 deletions

File tree

tests/e2e/orm/client-api/update.test.ts

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -154,68 +154,6 @@ describe('Client update tests', () => {
154154
expect(updatedUser?.updatedAt).toEqual(originalUpdatedAt);
155155
});
156156

157-
it('does not update updatedAt if only ignored fields are present', async () => {
158-
const user = await createUser(client, 'u1@test.com');
159-
const originalUpdatedAt = user.updatedAt;
160-
161-
await client.user.update({
162-
where: {
163-
id: user.id,
164-
},
165-
166-
data: {
167-
createdAt: new Date(),
168-
},
169-
})
170-
171-
let updatedUser = await client.user.findUnique({ where: { id: user.id } });
172-
expect(updatedUser?.updatedAt.getTime()).toEqual(originalUpdatedAt.getTime());
173-
174-
await client.user.update({
175-
where: {
176-
id: user.id,
177-
},
178-
179-
data: {
180-
id: 'User2',
181-
},
182-
})
183-
184-
updatedUser = await client.user.findUnique({ where: { id: 'User2' } });
185-
expect(updatedUser?.updatedAt.getTime()).toEqual(originalUpdatedAt.getTime());
186-
187-
// multiple ignored fields
188-
await client.user.update({
189-
where: {
190-
id: 'User2',
191-
},
192-
193-
data: {
194-
id: 'User3',
195-
createdAt: new Date(),
196-
},
197-
})
198-
199-
updatedUser = await client.user.findUnique({ where: { id: 'User3' } });
200-
expect(updatedUser?.updatedAt.getTime()).toEqual(originalUpdatedAt.getTime());
201-
});
202-
203-
it('updates updatedAt if any non-ignored fields are present', async () => {
204-
const user = await createUser(client, 'u1@test.com');
205-
const originalUpdatedAt = user.updatedAt;
206-
207-
await client.user.update({
208-
where: { id: user.id },
209-
data: {
210-
id: 'User2',
211-
name: 'User2',
212-
},
213-
});
214-
215-
const updatedUser = await client.user.findUnique({ where: { id: 'User2' } });
216-
expect(updatedUser?.updatedAt.getTime()).toBeGreaterThan(originalUpdatedAt.getTime());
217-
});
218-
219157
it('works with numeric incremental update', async () => {
220158
await createUser(client, 'u1@test.com', {
221159
profile: { create: { id: '1', bio: 'bio' } },

0 commit comments

Comments
 (0)