test

package
v0.23.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2018 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestHTTPClient = utils.NewHTTPClient("goflow-testing")

TestHTTPClient a HTTP client instance for tests

Functions

func AssertEqualJSON added in v0.23.0

func AssertEqualJSON(t *testing.T, expected json.RawMessage, actual json.RawMessage, msg string, msgArgs ...interface{}) bool

AssertEqualJSON checks two JSON strings for equality

func CreateSession added in v0.9.10

func CreateSession(assetsJSON json.RawMessage, testServerURL string) (flows.Session, error)

CreateSession creates a session with the given assets

func CreateTestSession

func CreateTestSession(testServerURL string, actionToAdd flows.Action) (flows.Session, []flows.Event, error)

CreateTestSession creates a standard example session for testing

func NewChannel added in v0.15.0

func NewChannel(name string, address string, schemes []string, roles []assets.ChannelRole, parent *assets.ChannelReference) *flows.Channel

func NewField added in v0.15.0

func NewField(key string, name string, valueType assets.FieldType) *flows.Field

func NewGroup added in v0.15.0

func NewGroup(name string, query string) *flows.Group

func NewTelChannel added in v0.15.0

func NewTelChannel(name string, address string, roles []assets.ChannelRole, parent *assets.ChannelReference, country string, matchPrefixes []string) *flows.Channel

func NewTestHTTPServer

func NewTestHTTPServer(port int) (*httptest.Server, error)

NewTestHTTPServer sets up a mock server for webhook actions

func NormalizeJSON added in v0.23.0

func NormalizeJSON(data json.RawMessage) ([]byte, error)

NormalizeJSON re-formats the given JSON

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL