let OpenMoneyToken = artifacts.require('OpenMoneyToken');

contract('OpenMoneyToken', (accounts) => {
  let subject;

  beforeEach(async () => {
    subject = await OpenMoneyToken.new();
  });

  it('should have the correct symbol', async () => {
    let symbol = await subject.symbol.call();
    assert.equal(symbol.valueOf(), 'OPEN');
  });

  it('should have the correct decimals', async () => {
    let decimals = await subject.decimals.call();
    assert.equal(decimals.valueOf(), 18);
  });

  it('should have the correct name', async () => {
    let name = await subject.name.call();
    assert.equal(name.valueOf(), 'OpenMoney Token');
  });

  it('should be ownable', async () => {
    let owner = await subject.owner.call();
    assert.notEqual(owner, null);
  });

  it('should be mintable', async () => {
    await subject.mint('0x12345', 100);
    let totalSupply = await subject.totalSupply.call();
    assert.equal(totalSupply.valueOf(), 100);
  });
});

