diff options
| author | Teddy Wing | 2016-04-22 02:28:45 -0400 | 
|---|---|---|
| committer | Teddy Wing | 2016-04-22 02:28:45 -0400 | 
| commit | bf3b4fa20746f074ebbdbe1b0d45a24da69837f5 (patch) | |
| tree | d2e8a6764fa5b058b211a04006e1b10bc0ad852d /src/main.rs | |
| parent | e008a5b8340ebf2a9965f3ce953a954997e0bb54 (diff) | |
| download | mutt-alias-auto-add-bf3b4fa20746f074ebbdbe1b0d45a24da69837f5.tar.bz2 | |
Make `update_alias_id` tests more DRY
Eliminate some of the repeated setup code in our tests for this method.
Instead of doing this work inside the test functions, move them to a new
constant binding and function respectively.
A `const` seemed like a good fit because our alias identifier is just a
string. For the `Alias`, we have a new function that returns a
test object for us, making it possible to get two mutable copies of it
(one for each of our test functions).
Tests still pass, I guess it worked.
Diffstat (limited to 'src/main.rs')
0 files changed, 0 insertions, 0 deletions
