Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ contract('StarNotary', (accs) => {
it('can Create a Star', async() => {
let tokenId = 1;
let instance = await StarNotary.deployed();
await instance.createStar('Awesome Star!', tokenId, {from: accounts[0]})
await instance.createStar('Awesome Star!', tokenId, {from: owner})
assert.equal(await instance.tokenIdToStarInfo.call(tokenId), 'Awesome Star!')
});

Expand Down Expand Up @@ -51,7 +51,6 @@ it('lets user2 buy a star, if it is put up for sale', async() => {
let balance = web3.utils.toWei(".05", "ether");
await instance.createStar('awesome star', starId, {from: user1});
await instance.putStarUpForSale(starId, starPrice, {from: user1});
let balanceOfUser1BeforeTransaction = await web3.eth.getBalance(user2);
await instance.buyStar(starId, {from: user2, value: balance});
assert.equal(await instance.ownerOf.call(starId), user2);
});
Expand All @@ -65,7 +64,6 @@ it('lets user2 buy a star and decreases its balance in ether', async() => {
let balance = web3.utils.toWei(".05", "ether");
await instance.createStar('awesome star', starId, {from: user1});
await instance.putStarUpForSale(starId, starPrice, {from: user1});
let balanceOfUser1BeforeTransaction = await web3.eth.getBalance(user2);
const balanceOfUser2BeforeTransaction = await web3.eth.getBalance(user2);
await instance.buyStar(starId, {from: user2, value: balance, gasPrice:0});
const balanceAfterUser2BuysStar = await web3.eth.getBalance(user2);
Expand Down