chatAuditLogRow builds a GetAuditLogsOffsetRow for a successful chat write with the given diff, suitable for testing auditLogDescription.
(t *testing.T, diff codersdk.AuditDiff)
| 212 | // chatAuditLogRow builds a GetAuditLogsOffsetRow for a successful chat write |
| 213 | // with the given diff, suitable for testing auditLogDescription. |
| 214 | func chatAuditLogRow(t *testing.T, diff codersdk.AuditDiff) database.GetAuditLogsOffsetRow { |
| 215 | t.Helper() |
| 216 | rawDiff, err := json.Marshal(diff) |
| 217 | require.NoError(t, err) |
| 218 | return database.GetAuditLogsOffsetRow{ |
| 219 | AuditLog: database.AuditLog{ |
| 220 | Action: database.AuditActionWrite, |
| 221 | StatusCode: 200, |
| 222 | ResourceType: database.ResourceTypeChat, |
| 223 | Diff: rawDiff, |
| 224 | }, |
| 225 | } |
| 226 | } |
no test coverage detected