tests: vault tests (#2366)
This commit is contained in:
@@ -42,7 +42,6 @@ describe('vaults', function () {
|
||||
it('should be able to create an offline vault', async () => {
|
||||
const vault = await vaults.createRandomizedVault({
|
||||
name: 'My Vault',
|
||||
storagePreference: KeySystemRootKeyStorageMode.Synced,
|
||||
})
|
||||
|
||||
expect(vault.systemIdentifier).to.not.be.undefined
|
||||
@@ -59,7 +58,6 @@ describe('vaults', function () {
|
||||
await context.application.addPasscode('123')
|
||||
const vault = await vaults.createRandomizedVault({
|
||||
name: 'My Vault',
|
||||
storagePreference: KeySystemRootKeyStorageMode.Synced,
|
||||
})
|
||||
|
||||
expect(vault.systemIdentifier).to.not.be.undefined
|
||||
@@ -75,7 +73,6 @@ describe('vaults', function () {
|
||||
it('should add item to offline vault', async () => {
|
||||
const vault = await vaults.createRandomizedVault({
|
||||
name: 'My Vault',
|
||||
storagePreference: KeySystemRootKeyStorageMode.Synced,
|
||||
})
|
||||
const item = await context.createSyncedNote()
|
||||
|
||||
@@ -89,7 +86,6 @@ describe('vaults', function () {
|
||||
const appIdentifier = context.identifier
|
||||
const vault = await vaults.createRandomizedVault({
|
||||
name: 'My Vault',
|
||||
storagePreference: KeySystemRootKeyStorageMode.Synced,
|
||||
})
|
||||
const note = await context.createSyncedNote('foo', 'bar')
|
||||
await vaults.moveItemToVault(vault, note)
|
||||
@@ -110,7 +106,6 @@ describe('vaults', function () {
|
||||
const appIdentifier = context.identifier
|
||||
const vault = await vaults.createRandomizedVault({
|
||||
name: 'My Vault',
|
||||
storagePreference: KeySystemRootKeyStorageMode.Synced,
|
||||
})
|
||||
const note = await context.createSyncedNote('foo', 'bar')
|
||||
await vaults.moveItemToVault(vault, note)
|
||||
@@ -138,7 +133,6 @@ describe('vaults', function () {
|
||||
const appIdentifier = context.identifier
|
||||
const vault = await vaults.createRandomizedVault({
|
||||
name: 'My Vault',
|
||||
storagePreference: KeySystemRootKeyStorageMode.Synced,
|
||||
})
|
||||
const note = await context.createSyncedNote('foo', 'bar')
|
||||
await vaults.moveItemToVault(vault, note)
|
||||
@@ -168,7 +162,6 @@ describe('vaults', function () {
|
||||
it('should create a vault', async () => {
|
||||
const vault = await vaults.createRandomizedVault({
|
||||
name: 'My Vault',
|
||||
storagePreference: KeySystemRootKeyStorageMode.Synced,
|
||||
})
|
||||
expect(vault).to.not.be.undefined
|
||||
|
||||
@@ -184,7 +177,6 @@ describe('vaults', function () {
|
||||
const note = await context.createSyncedNote('foo', 'bar')
|
||||
const vault = await vaults.createRandomizedVault({
|
||||
name: 'My Vault',
|
||||
storagePreference: KeySystemRootKeyStorageMode.Synced,
|
||||
})
|
||||
|
||||
await vaults.moveItemToVault(vault, note)
|
||||
@@ -198,7 +190,6 @@ describe('vaults', function () {
|
||||
const appIdentifier = context.identifier
|
||||
const vault = await vaults.createRandomizedVault({
|
||||
name: 'My Vault',
|
||||
storagePreference: KeySystemRootKeyStorageMode.Synced,
|
||||
})
|
||||
const note = await context.createSyncedNote('foo', 'bar')
|
||||
await vaults.moveItemToVault(vault, note)
|
||||
@@ -219,7 +210,6 @@ describe('vaults', function () {
|
||||
it('rotating a key system root key should create a new vault items key', async () => {
|
||||
const vault = await vaults.createRandomizedVault({
|
||||
name: 'My Vault',
|
||||
storagePreference: KeySystemRootKeyStorageMode.Synced,
|
||||
})
|
||||
|
||||
const keySystemItemsKey = context.keys.getKeySystemItemsKeys(vault.systemIdentifier)[0]
|
||||
@@ -235,7 +225,6 @@ describe('vaults', function () {
|
||||
it('deleting a vault should delete all its items', async () => {
|
||||
const vault = await vaults.createRandomizedVault({
|
||||
name: 'My Vault',
|
||||
storagePreference: KeySystemRootKeyStorageMode.Synced,
|
||||
})
|
||||
const note = await context.createSyncedNote('foo', 'bar')
|
||||
await vaults.moveItemToVault(vault, note)
|
||||
|
||||
Reference in New Issue
Block a user