Skip to content

Commit

Permalink
Use secret storage alg const in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jryans committed Nov 19, 2019
1 parent d51c5a2 commit ca3ef30
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec/unit/crypto/secrets.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import '../../olm-loader';

import expect from 'expect';
import { MatrixEvent } from '../../../lib/models/event';
import { SECRET_STORAGE_ALGORITHM_V1 } from '../../../lib/crypto/Secrets';

import olmlib from '../../../lib/crypto/olmlib';

Expand Down Expand Up @@ -94,7 +95,7 @@ describe("Secrets", function() {
};

const keyAccountData = {
algorithm: "m.secret_storage.v1.curve25519-aes-sha2",
algorithm: SECRET_STORAGE_ALGORITHM_V1,
pubkey: pubkey,
};
await alice._crypto._crossSigningInfo.signObject(keyAccountData, 'master');
Expand Down Expand Up @@ -164,7 +165,7 @@ describe("Secrets", function() {
alice.resetCrossSigningKeys();

const newKeyId = await alice.addSecretKey(
'm.secret_storage.v1.curve25519-aes-sha2',
SECRET_STORAGE_ALGORITHM_V1,
);
// we don't await on this because it waits for the event to come down the sync
// which won't happen in the test setup
Expand Down

0 comments on commit ca3ef30

Please sign in to comment.