Skip to content

Commit

Permalink
RI-6508: clean up compareConsents test params
Browse files Browse the repository at this point in the history
  • Loading branch information
KrumTy committed Feb 14, 2025
1 parent 26ec25f commit b9161cb
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions src/webviews/src/utils/comparisons/tests/compareConsents.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,43 +79,43 @@ describe('compareConsents: custom keytar encryption conditions', () => {
},
}

const agreements1 = {
eula: true,
encryption: false,
version: '1.0.6',
}

const agreements2 = {
eula: true,
encryption: false,
version: '1.0.7',
}

const agreements3 = {
eula: true,
encryption: true,
version: '1.0.6',
}

const agreements4 = {
eula: true,
encryption: true,
version: '1.0.7',
}

it('should prompt users with encryption set to false and v1.0.6 to set encryption again', () => {
expect(compareConsents(agreementsSpec, agreements1)).toHaveLength(1)
const agreements = {
eula: true,
encryption: false,
version: '1.0.6',
}

expect(compareConsents(agreementsSpec, agreements)).toHaveLength(1)
})

it('should NOT prompt users with encryption set to false and v1.0.7 to set encryption again', () => {
expect(compareConsents(agreementsSpec, agreements2)).toHaveLength(0)
const agreements = {
eula: true,
encryption: false,
version: '1.0.7',
}

expect(compareConsents(agreementsSpec, agreements)).toHaveLength(0)
})

it('should NOT prompt users with encryption set to true and v1.0.6 to set encryption again', () => {
expect(compareConsents(agreementsSpec, agreements3)).toHaveLength(0)
const agreements = {
eula: true,
encryption: true,
version: '1.0.6',
}

expect(compareConsents(agreementsSpec, agreements)).toHaveLength(0)
})

it('should NOT prompt users with encryption set to true and v1.0.7 to set encryption again', () => {
expect(compareConsents(agreementsSpec, agreements4)).toHaveLength(0)
const agreements = {
eula: true,
encryption: true,
version: '1.0.7',
}

expect(compareConsents(agreementsSpec, agreements)).toHaveLength(0)
})
})

0 comments on commit b9161cb

Please sign in to comment.