Skip to content

Commit 4210fbd

Browse files
leolocoBen-Rey
andauthored
Bump version to prepare release (#160)
Co-authored-by: BenRey <[email protected]>
1 parent 4917c90 commit 4210fbd

File tree

3 files changed

+6771
-1165
lines changed

3 files changed

+6771
-1165
lines changed

smart-contracts/assembly/contracts/FT/__tests__/WMAS.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ beforeEach(() => {
4141
describe('deposit', () => {
4242
it('should deposit MAS', () => {
4343
switchUser(user2Address);
44+
mockBalance(user2Address, amount);
4445
mockTransferredCoins(amount);
4546
deposit([]);
4647
const balance = balanceOf(new Args().add(user2Address).serialize());
@@ -50,8 +51,10 @@ describe('deposit', () => {
5051
});
5152
it('should not charge for storage for later deposits', () => {
5253
switchUser(user2Address);
54+
mockBalance(user2Address, amount);
5355
mockTransferredCoins(amount);
5456
deposit([]);
57+
mockBalance(user2Address, amount);
5558
mockTransferredCoins(amount);
5659
deposit([]);
5760
expect(balanceOf(new Args().add(user2Address).serialize())).toStrictEqual(
@@ -60,13 +63,15 @@ describe('deposit', () => {
6063
});
6164
it('should reject operation not covering storage cost', () => {
6265
switchUser(user3Address);
66+
mockBalance(user3Address, storageCost);
6367
mockTransferredCoins(storageCost);
6468
expect(() => {
6569
deposit([]);
6670
}).toThrow('Transferred amount is not enough to cover storage cost');
6771
});
6872
it('should deposit minimal amount', () => {
6973
switchUser(user3Address);
74+
mockBalance(user3Address, storageCost + 1);
7075
mockTransferredCoins(storageCost + 1);
7176
deposit([]);
7277
expect(balanceOf(new Args().add(user3Address).serialize())).toStrictEqual(
@@ -78,6 +83,7 @@ describe('deposit', () => {
7883
describe('withdraw', () => {
7984
beforeEach(() => {
8085
switchUser(user2Address);
86+
mockBalance(user2Address, amount);
8187
mockTransferredCoins(amount);
8288
deposit([]);
8389
mockBalance(contractAddr, amount);

0 commit comments

Comments
 (0)