Skip to content

Commit

Permalink
It should be possible to transfer
Browse files Browse the repository at this point in the history
some shares to another user
  • Loading branch information
piorot committed Feb 19, 2022
1 parent 7f1672e commit dd210bb
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,30 @@ describe("Apartment", function () {
const Apartment = await ethers.getContractFactory("Apartment");
const apartment = await Apartment.deploy();

[owner, Alice, Bob, Joe] = await ethers.getSigners();
[owner] = await ethers.getSigners();

await apartment.deployed();
let ownerBalance = await apartment.balanceOf(owner.address);

expect(ownerBalance).to.equal(100);

})

it("It should be possible to transfer some shares to another user", async () => {
const Apartment = await ethers.getContractFactory("Apartment");
const apartment = await Apartment.deploy();

[owner, Alice] = await ethers.getSigners();

await apartment.deployed();
await apartment.transfer(Alice.address, 20);
expect(await apartment.balanceOf(Alice.address)).to.equal(20);
expect(await apartment.balanceOf(owner.address)).to.equal(80);
})






});

1 comment on commit dd210bb

@piorot
Copy link
Owner Author

@piorot piorot commented on dd210bb Feb 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.