1
Fork 0

Add new options to all options test.

This commit is contained in:
Bauke 2022-04-02 21:58:41 +02:00
parent 48434fe8d3
commit 52fb210268
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
2 changed files with 7 additions and 3 deletions

View File

@ -44,7 +44,11 @@ fn test_generator() {
fn test_all_options() { fn test_all_options() {
let generator = Generator::default() let generator = Generator::default()
.set_base_url("cdn.libravatar.org") .set_base_url("cdn.libravatar.org")
.set_image_size(128); .set_default_image("identicon")
.set_force_default(true)
.set_image_size(128)
.set_include_file_extension(true)
.set_rating("pg");
let urls = [BAUKE_EMAIL, HOLLLO_EMAIL].map(|email| generator.generate(email)); let urls = [BAUKE_EMAIL, HOLLLO_EMAIL].map(|email| generator.generate(email));
insta::assert_debug_snapshot!("generate-options", urls); insta::assert_debug_snapshot!("generate-options", urls);

View File

@ -3,6 +3,6 @@ source: tests/lib.rs
expression: urls expression: urls
--- ---
[ [
"https://cdn.libravatar.org/avatar/ecd836ee843ff0ab75d4720bd40c2baf?s=128", "https://cdn.libravatar.org/avatar/ecd836ee843ff0ab75d4720bd40c2baf.jpg?d=identicon&f=y&s=128&r=pg",
"https://cdn.libravatar.org/avatar/ebff9105dce4954b1bdb57fdab079ff3?s=128", "https://cdn.libravatar.org/avatar/ebff9105dce4954b1bdb57fdab079ff3.jpg?d=identicon&f=y&s=128&r=pg",
] ]