testutils

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2014 License: Apache-2.0, Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RestHelper

type RestHelper struct{}

func (*RestHelper) Delete

func (h *RestHelper) Delete(c *C, url string) scroll.Response

func (*RestHelper) Get

func (h *RestHelper) Get(c *C, url string) scroll.Response

func (*RestHelper) Post

func (h *RestHelper) Post(c *C, url string, data url.Values) scroll.Response

func (*RestHelper) PostJSON

func (h *RestHelper) PostJSON(c *C, url, data string) scroll.Response

type TestApp

type TestApp struct {
	RestHelper
	// contains filtered or unexported fields
}

TestApp wraps a regular app adding features that can be used in unit tests.

func NewTestApp

func NewTestApp() *TestApp

NewTestApp creates a new app should be used in unit tests.

func (*TestApp) Close

func (testApp *TestApp) Close()

Close shuts down the underlying test server.

func (*TestApp) GetApp

func (testApp *TestApp) GetApp() *scroll.App

GetApp returns an underlying "real" app for the test app.

func (*TestApp) GetURL

func (testApp *TestApp) GetURL() string

GetURL returns the base URL of the underlying test server.

Jump to

Keyboard shortcuts

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