test: default value no network for contract
@@ -288,12 +288,21 @@ func Test_ConfigContractsComplex(t *testing.T) {
assert.Equal(t, "./cadence/kittyItems/contracts/KittyItems.cdc", contracts.GetByName("KittyItems").Source)
assert.Equal(t, "./cadence/kittyItemsMarket/contracts/KittyItemsMarket.cdc", contracts.getByNameAndNetwork("KittyItemsMarket", "emulator").Source)
assert.Equal(t, "0x123123123", contracts.getByNameAndNetwork("KittyItemsMarket", "testnet").Source)
+
+ assert.Equal(t, 2, len(contracts.GetByNetwork("testnet")))
+ assert.Equal(t, 2, len(contracts.GetByNetwork("emulator")))
+
+ assert.Equal(t, "./cadence/kittyItems/contracts/KittyItems.cdc", contracts.GetByNetwork("testnet")[0].Source)
+ assert.Equal(t, "0x123123123", contracts.GetByNetwork("testnet")[1].Source)
+
+ assert.Equal(t, "./cadence/kittyItems/contracts/KittyItems.cdc", contracts.GetByNetwork("emulator")[0].Source)
+ assert.Equal(t, "./cadence/kittyItemsMarket/contracts/KittyItemsMarket.cdc", contracts.GetByNetwork("emulator")[1].Source)
}
/* ================================================================
Deploy Config Tests
================================================================ */
-
+//TODO: more deploy tests
func Test_ConfigDeploySimple(t *testing.T) {
b := []byte(`{
"deploy": {
