From f67444a5602207c70187712d246591eed0ac29ec Mon Sep 17 00:00:00 2001 From: apostolof Date: Tue, 2 Feb 2021 22:42:49 +0200 Subject: [PATCH] test: add naive contract tests --- packages/concordia-contracts/test/TestForum.sol | 11 +++++++++++ packages/concordia-contracts/test/forum.js | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100755 packages/concordia-contracts/test/TestForum.sol create mode 100755 packages/concordia-contracts/test/forum.js diff --git a/packages/concordia-contracts/test/TestForum.sol b/packages/concordia-contracts/test/TestForum.sol new file mode 100755 index 0000000..c07f277 --- /dev/null +++ b/packages/concordia-contracts/test/TestForum.sol @@ -0,0 +1,11 @@ +pragma solidity >=0.4.21 <0.7.0; + +import "truffle/Assert.sol"; +import "../contracts/Forum.sol"; + +contract TestForum { + function testTrue() public { + + Assert.isTrue(true, "Oops placeholder test failed!"); + } +} \ No newline at end of file diff --git a/packages/concordia-contracts/test/forum.js b/packages/concordia-contracts/test/forum.js new file mode 100755 index 0000000..7120f66 --- /dev/null +++ b/packages/concordia-contracts/test/forum.js @@ -0,0 +1,11 @@ +const Forum = artifacts.require('Forum'); + +contract('Forum', (accounts) => { + it('...should succeed.', async () => { + const forumInstance = await Forum.deployed(); + + assert + .ok(forumInstance + .signUp('testUsername', { from: accounts[0] }), 'The user was not created.'); + }); +});