Commit 861b375
committed
Add test for failed authorization during restore
Add a unit test RestoreArchiveItemAsync_ShouldReturnFailure_WhenAuthorizationCheckFails to ArchiveRecoveryServiceTests. The test sets up an archived item and mocks the authorization service to return a NotFound error for CanWriteBoardAsync, then asserts the service returns a failure with ErrorCode NotFound and an error message indicating the board is missing. This covers the authorization failure path in RestoreArchiveItemAsync.1 parent 2b2b6fd commit 861b375
1 file changed
Lines changed: 24 additions & 0 deletions
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
375 | 399 | | |
376 | 400 | | |
377 | 401 | | |
| |||
0 commit comments