(t *testing.T)
| 285 | } |
| 286 | |
| 287 | func TestAttachmentInvalidUID(t *testing.T) { |
| 288 | t.Parallel() |
| 289 | ctx := context.Background() |
| 290 | ts := NewTestingStore(ctx, t) |
| 291 | |
| 292 | // Create with invalid UID (contains spaces) |
| 293 | _, err := ts.CreateAttachment(ctx, &store.Attachment{ |
| 294 | UID: "invalid uid with spaces", |
| 295 | CreatorID: 101, |
| 296 | Filename: "test.png", |
| 297 | Blob: []byte("test"), |
| 298 | Type: "image/png", |
| 299 | Size: 1000, |
| 300 | }) |
| 301 | require.Error(t, err) |
| 302 | require.Contains(t, err.Error(), "invalid uid") |
| 303 | |
| 304 | ts.Close() |
| 305 | } |
nothing calls this directly
no test coverage detected