Documentation ¶
Index ¶
- Variables
- func CreateSession(sessionAssets json.RawMessage) (flows.Session, error)
- func CreateTestSession(testServerPort int, actionToAdd flows.Action) (flows.Session, error)
- func NewTestEnvironment(dateFormat utils.DateFormat, tz *time.Location, now *time.Time) utils.Environment
- func NewTestHTTPServer(port int) (*httptest.Server, error)
- type TestEnvironment
Constants ¶
This section is empty.
Variables ¶
View Source
var TestHTTPClient = utils.NewHTTPClient("goflow-testing")
TestHTTPClient a HTTP client instance for tests
Functions ¶
func CreateSession ¶ added in v0.9.10
func CreateSession(sessionAssets json.RawMessage) (flows.Session, error)
CreateSession creates a session with the given assets
func CreateTestSession ¶
CreateTestSession creates a standard example session for testing
func NewTestEnvironment ¶ added in v0.9.4
func NewTestEnvironment(dateFormat utils.DateFormat, tz *time.Location, now *time.Time) utils.Environment
NewTestEnvironment creates a new test environment
Types ¶
type TestEnvironment ¶ added in v0.9.10
type TestEnvironment struct { utils.Environment // contains filtered or unexported fields }
TestEnvironment an extended environment that will let us override Now() so that it's constant
func (*TestEnvironment) Now ¶ added in v0.9.10
func (e *TestEnvironment) Now() time.Time
func (*TestEnvironment) SetNow ¶ added in v0.9.10
func (e *TestEnvironment) SetNow(now time.Time)
Click to show internal directories.
Click to hide internal directories.