Skip to content

Commit

Permalink
add to test, fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
bthaile committed Jan 10, 2024
1 parent c3f2676 commit 63dc7aa
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions internal/super/flix_test.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
/*
* Flow CLI
*
* Copyright 2024 Flow Foundation, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package super

import (
"testing"

"github.com/spf13/afero"
"github.com/stretchr/testify/assert"

"github.com/onflow/flow-cli/flowkit"
"github.com/onflow/flow-cli/flowkit/config"
"github.com/onflow/flow-cli/flowkit/tests"
"github.com/spf13/afero"
"github.com/stretchr/testify/assert"
)

func Test_flix_generate(t *testing.T) {
Expand Down Expand Up @@ -56,5 +75,11 @@ func Test_flix_generate(t *testing.T) {

cs := GetDeployedContracts(state)
assert.Equal(t, 1, len(cs))
networkContract := cs[tests.ContractHelloString.Name]
assert.NotNil(t, networkContract)
addr := networkContract["emulator"]
acct, err := state.Accounts().ByName("emulator-account")
assert.NoError(t, err)
assert.Equal(t, acct.Address.String(), addr)

}

0 comments on commit 63dc7aa

Please sign in to comment.