Skip to content

Commit

Permalink
Create security.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Oct 21, 2024
1 parent 20a7a5b commit 3c07693
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/security.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// tests/security.test.js
const { expect } = require('chai');
const TwoFactorAuthContract = artifacts.require('TwoFactorAuthContract');

contract('TwoFactorAuthContract', (accounts) => {
let twoFactorAuth;

before(async () => {
twoFactorAuth = await TwoFactorAuthContract.new();
});

it('should enable two-factor authentication', async () => {
await twoFactorAuth.enableTwoFactorAuth(accounts[0]);
const isEnabled = await twoFactorAuth.twoFactorAuth(accounts[0]);
expect(isEnabled).to.be.true;
});
});

0 comments on commit 3c07693

Please sign in to comment.