tests

package
v0.0.0-...-026aa9f Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertBool

func AssertBool(t *testing.T, got, expected bool)

func AssertResponseMessage

func AssertResponseMessage(t *testing.T, got, expected string)

func AssertStatusCode

func AssertStatusCode(t *testing.T, got, expected int)

func AssertValidationError

func AssertValidationError(t *testing.T, response map[string]interface{}, field string, expectedMessage string)

func CreateNotification

func CreateNotification(t *testing.T, r *gin.Engine, db *storage.Database, not notificationCRUD.Controller, notData models.NotificationReq, token string) string

func CreateOrganisation

func CreateOrganisation(t *testing.T, r *gin.Engine, db *storage.Database, org organisation.Controller, orgData models.CreateOrgRequestModel, token string) string

helper to create an organisation

func GetLoginToken

func GetLoginToken(t *testing.T, r *gin.Engine, auth auth.Controller, loginData models.LoginRequestModel) string

func ParseResponse

func ParseResponse(w *httptest.ResponseRecorder) map[string]interface{}

func Setup

func Setup() *utility.Logger

func SignupUser

func SignupUser(t *testing.T, r *gin.Engine, auth auth.Controller, userSignUpData models.CreateUserRequestModel, admin bool)

helper to signup a user

Types

This section is empty.

Jump to

Keyboard shortcuts

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