Skip to content

Commit

Permalink
Merge pull request #176 from epapbak/system_wide_rule_disable_testdata
Browse files Browse the repository at this point in the history
Add test data for organisation-wide disabled rules
  • Loading branch information
tisnik authored Jan 13, 2022
2 parents a4faa2e + 667114d commit 959d2c4
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions testdata/testdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,44 @@ var (
"Eight",
"Nine",
}
ResponseNoRulesDisabledSystemWide = `{
"meta": {
"count": 0
},
"data": []
}`

ResponseRule1DisabledSystemWide = struct {
Status string `json:"status"`
RuleDisable []types.SystemWideRuleDisable `json:"disabledRules"`
}{
Status: "ok",
RuleDisable: []types.SystemWideRuleDisable{
{
OrgID: OrgID,
UserID: UserID,
RuleID: Rule1ID,
ErrorKey: ErrorKey1,
Justification: "Rule 1 disabled for testing purposes",
},
},
}

ResponseRule2DisabledSystemWide = struct {
Status string `json:"status"`
RuleDisable []types.SystemWideRuleDisable `json:"disabledRules"`
}{
Status: "ok",
RuleDisable: []types.SystemWideRuleDisable{
{
OrgID: OrgID,
UserID: UserID,
RuleID: Rule2ID,
ErrorKey: ErrorKey2,
Justification: "Rule 2 disabled for testing purposes",
},
},
}
)

func timeToStr(t time.Time) string {
Expand Down

0 comments on commit 959d2c4

Please sign in to comment.