mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
refactor: fix test and ci
This commit is contained in:
parent
abffb9f95e
commit
3cb9b892da
3 changed files with 7 additions and 5 deletions
3
.github/workflows/commitlint.yml
vendored
3
.github/workflows/commitlint.yml
vendored
|
@ -24,7 +24,8 @@ jobs:
|
|||
uses: silverhand-io/actions-node-pnpm-run-steps@v4
|
||||
|
||||
- name: Commitlint
|
||||
run: npx commitlint --from HEAD~${{ github.event.pull_request.commits }} --to HEAD
|
||||
# Credit to https://stackoverflow.com/a/67365254/12514940
|
||||
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
|
||||
|
||||
- name: Commitlint on PR title
|
||||
run: echo '${{ github.event.pull_request.title }}' | npx commitlint
|
||||
|
|
|
@ -178,9 +178,10 @@ describe('admin console user management', () => {
|
|||
});
|
||||
|
||||
it('should update user password successfully', async () => {
|
||||
const user = await createUserByAdmin();
|
||||
const userEntity = await updateUserPassword(user.id, 'new_password');
|
||||
expect(userEntity).toMatchObject(user);
|
||||
const { updatedAt, ...rest } = await createUserByAdmin();
|
||||
const userEntity = await updateUserPassword(rest.id, 'new_password');
|
||||
expect(userEntity).toMatchObject(rest);
|
||||
expect(userEntity.updatedAt).toBeGreaterThan(updatedAt);
|
||||
});
|
||||
|
||||
it('should link social identity successfully', async () => {
|
||||
|
|
|
@ -14,7 +14,7 @@ $$ begin
|
|||
return new;
|
||||
end; $$ language plpgsql;
|
||||
|
||||
/** A function to set the created_at column to the current time. */
|
||||
/** A function to set the `updated_at` column to the current time. */
|
||||
create function set_updated_at() returns trigger as
|
||||
$$ begin
|
||||
new.updated_at = now();
|
||||
|
|
Loading…
Reference in a new issue