forked from Inflow-Music-Co/flow-social-token
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_integration_test.go
39 lines (31 loc) · 1.06 KB
/
setup_integration_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package main
import (
"github.com/bjartek/go-with-the-flow/v2/gwtf"
"github.com/stretchr/testify/assert"
"testing"
)
func TestSetupIntegration(t *testing.T) {
t.Run("Should create inmemory emulator client", func(t *testing.T) {
g := gwtf.NewGoWithTheFlowInMemoryEmulator()
assert.Equal(t, g.Network, "emulator")
})
t.Run("Should create local emulator client", func(t *testing.T) {
g := gwtf.NewGoWithTheFlowEmulator()
assert.Equal(t, g.Network, "emulator")
})
t.Run("Should create testnet client", func(t *testing.T) {
g := gwtf.NewGoWithTheFlowDevNet()
assert.Equal(t, g.Network, "testnet")
})
t.Run("Should create testnet client with for network metdho", func(t *testing.T) {
g := gwtf.NewGoWithTheFlowForNetwork("testnet")
assert.Equal(t, g.Network, "testnet")
})
t.Run("Should create mainnet client", func(t *testing.T) {
g := gwtf.NewGoWithTheFlowMainNet()
assert.Equal(t, g.Network, "mainnet")
assert.True(t, g.PrependNetworkToAccountNames)
g = g.DoNotPrependNetworkToAccountNames()
assert.False(t, g.PrependNetworkToAccountNames)
})
}