diff options
| author | Christian Cleberg <[email protected]> | 2026-04-12 22:42:33 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-04-12 22:42:33 -0500 |
| commit | 576bb6c2432a15f5138771c06019b55fd2244e15 (patch) | |
| tree | 167b4704658c11ea6b9e7170390098e13c89b94b /HutchTests/TicketBulkActionTests.swift | |
| parent | 54d037548261c1546555a89a6a803b542a769880 (diff) | |
| download | hutch-576bb6c2432a15f5138771c06019b55fd2244e15.tar.gz hutch-576bb6c2432a15f5138771c06019b55fd2244e15.tar.bz2 hutch-576bb6c2432a15f5138771c06019b55fd2244e15.zip | |
feat: add ticket label management and bulk actions
Implements: https://todo.sr.ht/~ccleberg/hutch/45
Implements: https://todo.sr.ht/~ccleberg/hutch/46
Diffstat (limited to 'HutchTests/TicketBulkActionTests.swift')
| -rw-r--r-- | HutchTests/TicketBulkActionTests.swift | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/HutchTests/TicketBulkActionTests.swift b/HutchTests/TicketBulkActionTests.swift new file mode 100644 index 0000000..2f4d1fd --- /dev/null +++ b/HutchTests/TicketBulkActionTests.swift @@ -0,0 +1,35 @@ +import Testing +@testable import Hutch + +struct TicketBulkActionTests { + + @Test + func bulkActionResultFormatsSuccessMessage() { + let result = TicketBulkActionResult( + action: .close, + totalCount: 3, + updatedCount: 3, + unchangedCount: 0, + failures: [] + ) + + #expect(result.title == "Close Complete") + #expect(result.message == "Closed 3 tickets.") + } + + @Test + func bulkActionResultFormatsPartialFailureMessage() { + let result = TicketBulkActionResult( + action: .assign, + totalCount: 4, + updatedCount: 2, + unchangedCount: 1, + failures: [ + TicketBulkActionFailure(ticketID: 42, message: "Network error") + ] + ) + + #expect(result.title == "Assign Partially Applied") + #expect(result.message == "Assigned 2 tickets. 1 already assigned. Failed: #42.") + } +} |
