Skip to content

Commit

Permalink
Setup
Browse files Browse the repository at this point in the history
  • Loading branch information
odd-amphora committed Nov 24, 2021
1 parent 17095fd commit fd6199d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/JBDirectory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ contract JBDirectory is IJBDirectory, JBOperatable {
*/
function _maybeAddTerminal(
uint256 _projectId,
IJBTerminal memory _terminal,
IJBTerminal _terminal,
address _caller
) internal {
require(_terminal != IJBTerminal(address(0)), '0x2d: ZERO_ADDRESS');
Expand Down
27 changes: 27 additions & 0 deletions test/jb_directory/add_terminals.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { expect } from 'chai';
import { ethers } from 'hardhat';

import { deployMockContract } from '@ethereum-waffle/mock-contract';

import jbOperatoreStore from "../../artifacts/contracts/JBOperatorStore.sol/JBOperatorStore.json";
import jbProjects from "../../artifacts/contracts/JBProjects.sol/JBProjects.json";

describe('JBDirectory::addTerminals(...)', function () {

async function setup() {
let [deployer, ...addrs] = await ethers.getSigners();

let mockJbOperatorStore = await deployMockContract(deployer, jbOperatoreStore.abi);
let mockJbProjects = await deployMockContract(deployer, jbProjects.abi);

let jbDirectoryFactory = await ethers.getContractFactory('JBDirectory');
let jbDirectory = await jbDirectoryFactory.deploy(mockJbOperatorStore.address, mockJbProjects.address);

return { deployer, addrs, mockJbOperatorStore, mockJbProjects, jbDirectory };
}

it('hello world', async function () {
const { deployer } = await setup();
});

});

0 comments on commit fd6199d

Please sign in to comment.