From 91f82c020d6f249d8fe24124d758715239536a67 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 18 Apr 2016 22:43:01 -0400 Subject: 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. --- src/tests.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/tests.rs') 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 ", + &Alias { + alias: "farnsworth-hubert".to_string(), + name: "Hubert Farnsworth".to_string(), + email: "".to_string() + }, "./testdata/aliases" ); } -- cgit v1.2.3