testingutils

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowOneInlinePrivacyPolicy

func AllowOneInlinePrivacyPolicy(p ent.PrivacyPolicyRule) privacy.InlinePrivacyPolicy

AllowOneInlinePrivacyPolicy wraps AllowOneRule() by an InlinePrivacyPolicy

func AllowOneRule

func AllowOneRule(p ent.PrivacyPolicyRule) []ent.PrivacyPolicyRule

AllowOneRule sandwiches the given rule between an AllowIfOmniscientRule and an AlwaysDenyRule

func AssertEmailSent

func AssertEmailSent(t *testing.T, emailAddress string, emailText string)

func AssertEntLogged

func AssertEntLogged(t *testing.T, ent ent.Entity)

func CreateEdge

func CreateEdge(t *testing.T, edge *ent.AssocEdgeData)

func DefaultCompilerOptions

func DefaultCompilerOptions() string

func DenyOneInlinePrivacyPolicy

func DenyOneInlinePrivacyPolicy(p ent.PrivacyPolicyRule) privacy.InlinePrivacyPolicy

DenyOneInlinePrivacyPolicy wraps DenyOneRule() by an InlinePrivacyPolicy

func DenyOneRule

func DenyOneRule(p ent.PrivacyPolicyRule) []ent.PrivacyPolicyRule

DenyOneRule sandwiches the given rule between an AllowIfOmniscientRule and an AlwaysDenyRule

func EditEdge

func EditEdge(t *testing.T, edge *ent.AssocEdgeData)

func GetBaseBuilder

func GetBaseBuilder(
	operation ent.WriteOperation,
	loader ent.Loader,
	existingEnt ent.Entity,
) *actions.EntMutationBuilder

func SaveBuilder

func SaveBuilder(t *testing.T, b ent.MutationBuilder)

func VerifyEdge

func VerifyEdge(t *testing.T, expectedEdge, edge *ent.AssocEdge)

Types

type ActionLoggerObserver

type ActionLoggerObserver struct {
	Action actions.Action
}

This is reusable across ent types

func (*ActionLoggerObserver) Observe

func (observer *ActionLoggerObserver) Observe() error

type SendEmailHandler

type SendEmailHandler struct {
	Text  string
	Email string
}

func (*SendEmailHandler) SendEmail

func (s *SendEmailHandler) SendEmail() error

type SendMicroserviceObserver

type SendMicroserviceObserver struct {
}

boo microserv

func (SendMicroserviceObserver) Observe

func (SendMicroserviceObserver) Observe() error

type Suite

type Suite struct {
	suite.Suite
	Tables []string

	ForceClean bool
	// contains filtered or unexported fields
}

func (*Suite) SetupSuite

func (suite *Suite) SetupSuite()

func (*Suite) SetupTest

func (suite *Suite) SetupTest()

func (*Suite) TearDownTest

func (suite *Suite) TearDownTest()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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