@@ -48,7 +48,7 @@ contract("Colony Network", accounts => {
4848
4949 it ( "should have the correct current Colony version set" , async ( ) => {
5050 const currentColonyVersion = await colonyNetwork . getCurrentColonyVersion ( ) ;
51- expect ( currentColonyVersion ) . to . eq . BN ( 1 ) ;
51+ expect ( currentColonyVersion ) . to . eq . BN ( 2 ) ;
5252 } ) ;
5353
5454 it ( "should have the Resolver for current Colony version set" , async ( ) => {
@@ -80,7 +80,7 @@ contract("Colony Network", accounts => {
8080 } ) ;
8181
8282 it ( "should not be able to initialise network twice" , async ( ) => {
83- await checkErrorRevert ( colonyNetwork . initialise ( "0xDde1400C69752A6596a7B2C1f2420Fb9A71c1FDA" ) , "colony-network-already-initialised" ) ;
83+ await checkErrorRevert ( colonyNetwork . initialise ( "0xDde1400C69752A6596a7B2C1f2420Fb9A71c1FDA" , 3 ) , "colony-network-already-initialised" ) ;
8484 } ) ;
8585
8686 it ( "should not be able to create a colony if the network is not initialised" , async ( ) => {
@@ -94,6 +94,26 @@ contract("Colony Network", accounts => {
9494 "colony-network-not-initialised-cannot-create-colony"
9595 ) ;
9696 } ) ;
97+
98+ it ( "should not be able to initialise the network with colony version number 0" , async ( ) => {
99+ const resolverColonyNetworkDeployed = await Resolver . deployed ( ) ;
100+ const etherRouter = await EtherRouter . new ( ) ;
101+ await etherRouter . setResolver ( resolverColonyNetworkDeployed . address ) ;
102+ const colonyNetworkNew = await IColonyNetwork . at ( etherRouter . address ) ;
103+
104+ await checkErrorRevert ( colonyNetworkNew . initialise ( "0xDde1400C69752A6596a7B2C1f2420Fb9A71c1FDA" , 0 ) , "colony-network-invalid-version" ) ;
105+ } ) ;
106+
107+ it ( "should be able to initialise the network with any colony version number greater than 0" , async ( ) => {
108+ const resolverColonyNetworkDeployed = await Resolver . deployed ( ) ;
109+ const etherRouter = await EtherRouter . new ( ) ;
110+ await etherRouter . setResolver ( resolverColonyNetworkDeployed . address ) ;
111+ const colonyNetworkNew = await IColonyNetwork . at ( etherRouter . address ) ;
112+
113+ await colonyNetworkNew . initialise ( "0xDde1400C69752A6596a7B2C1f2420Fb9A71c1FDA" , 79 ) ;
114+ const currentColonyVersion = await colonyNetworkNew . getCurrentColonyVersion ( ) ;
115+ expect ( currentColonyVersion ) . to . eq . BN ( 79 ) ;
116+ } ) ;
97117 } ) ;
98118
99119 describe ( "when managing the mining process" , ( ) => {
0 commit comments