Documentation ¶
Index ¶
- Constants
- func CheckError(t *testing.T, response *httptest.ResponseRecorder, expectedCode int, ...)
- func CleanCache(ctx context.Context, t *testing.T, cache *cache.Cache) func()
- func CleanDb(ctx goContext.Context, t *testing.T, connector *dbutil.Connector) func()
- func CleanStorage(t *testing.T, storage *storage.LocalStorage) func()
- func CreateDraft(ctx goContext.Context, t *testing.T, storage *storage.LocalStorage, ...) *entity.Draft
- func CreateInvoice(ctx goContext.Context, t *testing.T, connector *dbutil.Connector, id string, ...) *entity.Invoice
- func CreateToken(ctx context.Context, t *testing.T, cache *cache.Cache, user *entity.User) string
- func CreateUser(ctx goContext.Context, t *testing.T, connector *dbutil.Connector, ico string) *entity.User
- func ExecuteApiKeyRequest(handler http.Handler, req *http.Request, token string) *httptest.ResponseRecorder
- func ExecuteAuthRequest(handler http.Handler, req *http.Request, authToken string) *httptest.ResponseRecorder
- func ExecuteRequest(handler http.Handler, req *http.Request) *httptest.ResponseRecorder
- func WithTest(invoice *entity.Invoice)
- type ErrorResponse
- type TestInvoiceOption
- func WithAmount(amount float64) TestInvoiceOption
- func WithAmountCurrency(currency string) TestInvoiceOption
- func WithAmountWithoutVat(amount float64) TestInvoiceOption
- func WithAmountWithoutVatCurrency(currency string) TestInvoiceOption
- func WithCustomerIco(ico string) TestInvoiceOption
- func WithCustomerName(name string) TestInvoiceOption
- func WithIssueDate(date timeutil.Date) TestInvoiceOption
- func WithSupplierIco(ico string) TestInvoiceOption
- func WithSupplierName(name string) TestInvoiceOption
Constants ¶
View Source
const ( TestPrivateKey = "" /* 1700-byte string literal not displayed */ TestPublicKey = "" /* 460-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func CheckError ¶
func CleanStorage ¶
func CleanStorage(t *testing.T, storage *storage.LocalStorage) func()
func CreateDraft ¶
func CreateInvoice ¶
func CreateToken ¶
func CreateUser ¶
func ExecuteApiKeyRequest ¶
func ExecuteAuthRequest ¶
func ExecuteRequest ¶
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
type TestInvoiceOption ¶
func WithAmount ¶
func WithAmount(amount float64) TestInvoiceOption
func WithAmountCurrency ¶
func WithAmountCurrency(currency string) TestInvoiceOption
func WithAmountWithoutVat ¶
func WithAmountWithoutVat(amount float64) TestInvoiceOption
func WithAmountWithoutVatCurrency ¶
func WithAmountWithoutVatCurrency(currency string) TestInvoiceOption
func WithCustomerIco ¶
func WithCustomerIco(ico string) TestInvoiceOption
func WithCustomerName ¶
func WithCustomerName(name string) TestInvoiceOption
func WithIssueDate ¶
func WithIssueDate(date timeutil.Date) TestInvoiceOption
func WithSupplierIco ¶
func WithSupplierIco(ico string) TestInvoiceOption
func WithSupplierName ¶
func WithSupplierName(name string) TestInvoiceOption
Source Files ¶
Click to show internal directories.
Click to hide internal directories.