Skip to content

Commit

Permalink
feat: fix TestSyncer to avoid password test
Browse files Browse the repository at this point in the history
  • Loading branch information
hsluoyz committed Jan 19, 2024
1 parent b5541cb commit 020e93a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/syncer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ test('TestSyncer', async () => {
}

// Update the object
const updatedPassword = '123456'
retrievedSyncer.password = updatedPassword
const updatedHost = 'Updated Host'
retrievedSyncer.host = updatedHost
const { data: updateResponse } = await sdk.updateSyncer(retrievedSyncer)
if (updateResponse.data !== 'Affected') {
throw new Error('Failed to update object')
Expand All @@ -82,9 +82,9 @@ test('TestSyncer', async () => {
const {
data: { data: updatedSyncer },
} = await sdk.getSyncer(name)
if (updatedSyncer.password !== updatedPassword) {
if (updatedSyncer.host !== updatedHost) {
throw new Error(
`Failed to update object, description mismatch: ${updatedSyncer.password} != ${updatedPassword}`,
`Failed to update object, host mismatch: ${updatedSyncer.host} != ${updatedHost}`,
)
}

Expand Down

0 comments on commit 020e93a

Please sign in to comment.