Add a test for all options.
This commit is contained in:
parent
b3c08e565a
commit
c1a5b2d7dc
10
tests/lib.rs
10
tests/lib.rs
|
@ -39,3 +39,13 @@ fn test_generator() {
|
|||
insta::assert_debug_snapshot!(format!("generate-{name}"), urls);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_all_options() {
|
||||
let generator = Generator::default()
|
||||
.set_base_url("cdn.libravatar.org")
|
||||
.set_image_size(128);
|
||||
|
||||
let urls = [BAUKE_EMAIL, HOLLLO_EMAIL].map(|email| generator.generate(email));
|
||||
insta::assert_debug_snapshot!("generate-options", urls);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
source: tests/lib.rs
|
||||
expression: urls
|
||||
---
|
||||
[
|
||||
"https://cdn.libravatar.org/avatar/ecd836ee843ff0ab75d4720bd40c2baf?s=128",
|
||||
"https://cdn.libravatar.org/avatar/ebff9105dce4954b1bdb57fdab079ff3?s=128",
|
||||
]
|
Loading…
Reference in New Issue