test(rules): add unit tests covering all public methods and edge cases

- Add comprehensive test coverage for all Rules public methods
- Test both success and error paths with proper assertions
- Add PartialEq derive to EolAction to enable comparisons in tests
- Include edge cases like duplicate labels and nonexistent IDs
- Mark file system integration tests as ignore to avoid interference
This commit is contained in:
Jeremiah Russell
2025-10-19 08:25:14 +01:00
committed by Jeremiah Russell
parent 222bd87415
commit 74512bdea3
2 changed files with 347 additions and 1 deletions

View File

@@ -3,7 +3,7 @@ use std::fmt;
/// End of life action
/// - Trash - move the message to the trash to be automatically deleted by Google
/// - Delete - delete the message immediately without allowing rescue from trash
#[derive(Debug, Default, Clone)]
#[derive(Debug, Default, Clone, PartialEq)]
pub enum EolAction {
#[default]
/// Move the message to the trash