testutils

package
v0.0.0-...-11149d6 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package testutils provides utilities for testing.

Index

Constants

View Source
const MaxUUIDs = 10

MaxUUIDs is the maximum number of fixed UUIDs.

Variables

This section is empty.

Functions

func AssertJSON

func AssertJSON(t *testing.T, want, got []byte)

AssertJSON asserts that the JSON bytes are equal.

func AssertResponse

func AssertResponse(t *testing.T, got *http.Response, status int, body []byte)

AssertResponse asserts that the response status code and body are equal to the expected values.

func FixedUUID

func FixedUUID(t *testing.T, i int) uuid.UUID

FixedUUID returns a fixed UUID.

func LoadFile

func LoadFile(t *testing.T, path string) []byte

LoadFile reads a file and returns its content.

Types

This section is empty.

Directories

Path Synopsis
Package factory provides a way to create test data for the tests.
Package factory provides a way to create test data for the tests.
Package testauth provides a mock implementation of auth.Auth for testing.
Package testauth provides a mock implementation of auth.Auth for testing.

Jump to

Keyboard shortcuts

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