Commit cdfe1ec1 authored by Theerathat Pornprinya's avatar Theerathat Pornprinya

Preliminary archives

parent 1de9f815
......@@ -54,33 +54,33 @@ describe('Marketplace', () => {
assert.equal(accounts[0], manager);
});
/*it('list product for sales', async () => {
it('list product for sales', async () => {
await marketplace.methods.
});*/
});
it('allows people to buy product', async () => {
/*await marketplace.methods.buyEquity().send({
await marketplace.methods.buyEquity().send({
value: '5',
from: accounts[1]
});
const manager = await marketplace.methods.manager().call();
assert.equal(accounts[1], manager);*/
assert(true);
assert.equal(accounts[1], manager);
});
it('allows people to make offer', async () => {
/*await marketplace.methods.makeOffer('Please').send({
await marketplace.methods.makeOffer('Please').send({
value: '1',
from: accounts[1]
});
const highestOfferPrice = await marketplace.methods.highestOfferPrice().call();
assert.equal(highestOfferPrice, 1);*/
assert(true);
assert.equal(highestOfferPrice, 1);
});
it('if multiple offer then only the highest appear top', async () => {
/*await marketplace.methods.makeOffer('Account 1').send({
await marketplace.methods.makeOffer('Account 1').send({
value: '1',
from: accounts[1]
});
......@@ -91,12 +91,12 @@ describe('Marketplace', () => {
});
const highestOfferPrice = await marketplace.methods.highestOfferPrice().call();
assert.equal(highestOfferPrice, 2);*/
assert(true);
assert.equal(highestOfferPrice, 2);
});
it('if someone bid higher then refund to the previously highest bidder', async () => {
/*await marketplace.methods.makeOffer('Account 1').send({
await marketplace.methods.makeOffer('Account 1').send({
value: '1',
from: accounts[1]
});
......@@ -107,12 +107,12 @@ describe('Marketplace', () => {
});
const refund = await marketplace.methods.getRefundAmount(accounts[1]).call();
assert.equal(refund, 1);*/
assert(true);
assert.equal(refund, 1);
});
it('allows to withdraw', async () => {
/*await marketplace.methods.makeOffer('Account 1').send({
await marketplace.methods.makeOffer('Account 1').send({
value: '1',
from: accounts[1]
});
......@@ -130,11 +130,6 @@ describe('Marketplace', () => {
balance = web3.utils.fromWei(balance, 'ether');
balance = parseFloat(balance);
assert(balance > 99.5);*/
assert(true);
});
it('offer product ownership to the right ', async () => {
assert(true);
assert(balance > 99.5);
});
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment