fix: corrected test cases

This commit is contained in:
aniket 2025-10-06 14:48:08 +05:30
parent cebc4df68c
commit 0634a88d80
No known key found for this signature in database
GPG Key ID: 0A7D63CA7885F524

View File

@ -821,7 +821,7 @@ func TestDeleteRule(t *testing.T) {
claims := &authtypes.Claims{ claims := &authtypes.Claims{
Email: "test@example.com", Email: "test@example.com",
} }
manager, mockSQLRuleStore, orgId := setupTestManager(t) manager, mockSQLRuleStore, mockRouteStore, _, orgId := setupTestManager(t)
claims.OrgID = orgId claims.OrgID = orgId
testCases := []struct { testCases := []struct {
@ -957,6 +957,7 @@ func TestDeleteRule(t *testing.T) {
} }
mockSQLRuleStore.ExpectGetStoredRule(ruleID, existingRule) mockSQLRuleStore.ExpectGetStoredRule(ruleID, existingRule)
mockRouteStore.ExpectDeleteRouteByName(existingRule.OrgID, ruleID.String())
mockSQLRuleStore.ExpectDeleteRule(ruleID) mockSQLRuleStore.ExpectDeleteRule(ruleID)
ctx := authtypes.NewContextWithClaims(context.Background(), *claims) ctx := authtypes.NewContextWithClaims(context.Background(), *claims)