Skip to content

Commit 7ab123f

Browse files
committed
test: cover idempotent signature file init
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 352d559 commit 7ab123f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/tests/store/signMethods.spec.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,16 @@ describe('signMethods store', () => {
6767
expect(store.hasSignatureFile()).toBe(true)
6868
})
6969

70+
it('initializes signature file flag only once', () => {
71+
const store = useSignMethodsStore()
72+
73+
store.initializeHasSignatureFile(false)
74+
expect(store.hasSignatureFile()).toBe(false)
75+
76+
store.initializeHasSignatureFile(true)
77+
expect(store.hasSignatureFile()).toBe(false)
78+
})
79+
7080
it('checks if certificate is needed', () => {
7181
const store = useSignMethodsStore()
7282
store.settings = {

0 commit comments

Comments
 (0)