http

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: MIT Imports: 9 Imported by: 0

README

godog-http

Build Status codecov Go Report Card GoDoc

godog-http defines a godog feature context which adds steps to test http.Handler implementations.

Installation

go get -u github.com/martinohmann/godog-http

Usage

Check feature_context_test.go and the features/ for usage examples.

License

The source code of godog-http is released under the MIT License. See the bundled LICENSE file for details.

Documentation

Overview

Package http defines a godog feature context which adds steps to test http.Handler implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FeatureContext

type FeatureContext struct {
	// contains filtered or unexported fields
}

FeatureContext adds steps to setup and verify http handlers in godog tests.

func NewFeatureContext

func NewFeatureContext(handler http.Handler) *FeatureContext

NewFeatureContext creates a new FeatureContext. It expects a http.Handler which the test suite can make requests against.

func (*FeatureContext) Register

func (c *FeatureContext) Register(s *godog.Suite)

Register registers the feature context to the godog suite.

Jump to

Keyboard shortcuts

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