diff options
| author | Teddy Wing | 2016-04-18 22:43:01 -0400 |
|---|---|---|
| committer | Teddy Wing | 2016-04-18 22:43:01 -0400 |
| commit | 91f82c020d6f249d8fe24124d758715239536a67 (patch) | |
| tree | 078d00145792d5c2e1dcba36263bd215f20d7c70 /src/tests.rs | |
| parent | 1f8cbcedc3f298f68750075bfdf7aae065d53e87 (diff) | |
| download | mutt-alias-auto-add-91f82c020d6f249d8fe24124d758715239536a67.tar.bz2 | |
is_alias_in_file: Take an Alias instead of an alias string
This allows us to more easily compare parts of the alias line.
Update our test to pass an `Alias` also.
Diffstat (limited to 'src/tests.rs')
| -rw-r--r-- | src/tests.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tests.rs b/src/tests.rs index c884188..d59fcc6 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -44,7 +44,11 @@ fn new_alias_with_special_characters() { #[test] fn is_alias_in_file_finds_a_match() { is_alias_in_file( - "alias farnsworth-hubert Hubert Farnsworth <professor@planetexpress.com>", + &Alias { + alias: "farnsworth-hubert".to_string(), + name: "Hubert Farnsworth".to_string(), + email: "<professor@planetexpress.com>".to_string() + }, "./testdata/aliases" ); } |
