Documentation
¶
Index ¶
- func AssertEqual(t *testing.T, got, want any)
- func AssertErrorContains(t *testing.T, got error, want string)
- func AssertErrorIs(t *testing.T, got error, want error)
- func AssertNilError(t *testing.T, got error)
- func AssertNotEqual(t *testing.T, got, notwant any)
- func AssertSliceContains[T comparable](t *testing.T, got []T, want T)
- func AssertStringContains(t *testing.T, got, want string)
- func CreateBlog(t *testing.T, store *storage.Storage) *admin.Blog
- func CreatePost(t *testing.T, store *storage.Storage) *admin.Post
- func CreateTag(t *testing.T, store *storage.Storage) *admin.Tag
- func NewBlog() *admin.Blog
- func NewConfig(t *testing.T) config.Config
- func NewPost(blog *admin.Blog) *admin.Post
- func NewTag() *admin.Tag
- func RandomString(n int) string
- func RandomTime() time.Time
- func RandomURL(n int) string
- type CloserFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertEqual ¶
func AssertNilError ¶
func AssertNotEqual ¶
func AssertSliceContains ¶
func AssertSliceContains[T comparable](t *testing.T, got []T, want T)
func AssertStringContains ¶
func CreateBlog ¶
mocks a blog and creates it in the database
func CreatePost ¶
mocks a post and creates it in the database
func RandomString ¶
func RandomTime ¶
Types ¶
type CloserFunc ¶
type CloserFunc func()
func NewDatabase ¶
func NewDatabase(t *testing.T) (postgres.Conn, CloserFunc)
func NewStorage ¶
func NewStorage(t *testing.T) (*storage.Storage, CloserFunc)
Click to show internal directories.
Click to hide internal directories.