test

package
v0.2.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMockBlog added in v0.0.5

func CreateMockBlog(t *testing.T, storage *storage.Storage) bloggulus.Blog

mocks a blog and creates it in the database

func CreateMockPost added in v0.0.5

func CreateMockPost(t *testing.T, storage *storage.Storage) bloggulus.Post

mocks a post and creates it in the database

func NewConfig added in v0.1.0

func NewConfig(t *testing.T) config.Config

func NewLogger

func NewLogger(t *testing.T) *log.Logger

func NewMockBlog

func NewMockBlog() bloggulus.Blog

func NewMockPost

func NewMockPost(blog bloggulus.Blog) bloggulus.Post

func RandomString

func RandomString(n int) string

func RandomTime

func RandomTime() time.Time

func RandomURL

func RandomURL(n int) string

Types

type CloserFunc added in v0.1.0

type CloserFunc func()

func NewDatabase added in v0.1.0

func NewDatabase(t *testing.T) (database.Conn, CloserFunc)

func NewStorage added in v0.1.0

func NewStorage(t *testing.T) (*storage.Storage, CloserFunc)

Jump to

Keyboard shortcuts

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