Documentation
¶
Index ¶
- func AssertAtLeast(t *testing.T, got, want int)
- func AssertEqual(t *testing.T, got, want any)
- func AssertErrorAs(t *testing.T, got error, 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 CreateAccount(t *testing.T, repo *repository.Repository) *model.Account
- func CreateAccountBlog(t *testing.T, repo *repository.Repository, account *model.Account, ...)
- func CreateAccountPage(t *testing.T, repo *repository.Repository, account *model.Account, ...)
- func CreateBlog(t *testing.T, repo *repository.Repository) *model.Blog
- func CreatePage(t *testing.T, repo *repository.Repository) *model.Page
- func CreatePost(t *testing.T, repo *repository.Repository, blog *model.Blog) *model.Post
- func CreateSession(t *testing.T, repo *repository.Repository, account *model.Account) (*model.Session, string)
- func CreateTag(t *testing.T, repo *repository.Repository) *model.Tag
- func NewAccount(t *testing.T) *model.Account
- func NewBlog(t *testing.T) *model.Blog
- func NewConfig(t *testing.T) config.Config
- func NewPage(t *testing.T) *model.Page
- func NewPost(t *testing.T, blog *model.Blog) *model.Post
- func NewSession(t *testing.T, account *model.Account) (*model.Session, string)
- func NewSyncService(t *testing.T, repo *repository.Repository, ...) *service.SyncService
- func NewTag(t *testing.T) *model.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 AssertAtLeast ¶ added in v0.3.7
func AssertEqual ¶
func AssertNilError ¶
func AssertNotEqual ¶
func AssertSliceContains ¶
func AssertSliceContains[T comparable](t *testing.T, got []T, want T)
func AssertStringContains ¶
func CreateAccount ¶ added in v0.3.6
func CreateAccount(t *testing.T, repo *repository.Repository) *model.Account
mocks an account and creates it in the database
func CreateAccountBlog ¶ added in v0.4.0
func CreateAccountBlog(t *testing.T, repo *repository.Repository, account *model.Account, blog *model.Blog)
create an account blog in the database
func CreateAccountPage ¶ added in v0.5.0
func CreateAccountPage(t *testing.T, repo *repository.Repository, account *model.Account, page *model.Page)
create an account page in the database
func CreateBlog ¶
func CreateBlog(t *testing.T, repo *repository.Repository) *model.Blog
mocks a blog and creates it in the database
func CreatePage ¶ added in v0.5.0
func CreatePage(t *testing.T, repo *repository.Repository) *model.Page
mocks a page and creates it in the database
func CreatePost ¶
func CreatePost(t *testing.T, repo *repository.Repository, blog *model.Blog) *model.Post
mocks a post and creates it in the database
func CreateSession ¶ added in v0.4.0
func CreateSession(t *testing.T, repo *repository.Repository, account *model.Account) (*model.Session, string)
mocks a session and creates it in the database
func CreateTag ¶
func CreateTag(t *testing.T, repo *repository.Repository) *model.Tag
mocks a tag and creates it in the database
func NewSession ¶ added in v0.4.0
func NewSyncService ¶ added in v0.3.6
func NewSyncService( t *testing.T, repo *repository.Repository, feeds map[string]fetch.FetchFeedResponse, ) *service.SyncService
func RandomString ¶
func RandomTime ¶
Types ¶
type CloserFunc ¶
type CloserFunc func()
func NewDatabase ¶
func NewDatabase(t *testing.T) (postgres.Conn, CloserFunc)
func NewRepository ¶ added in v0.4.0
func NewRepository(t *testing.T) (*repository.Repository, CloserFunc)
Click to show internal directories.
Click to hide internal directories.