forked from vhaudiquet/rhema-together
test: build config values with struct update
Clippy rejects assigning fields after Config::default(). Initialize the preview and public URL fields in the struct literal instead. No behavior changes.
This commit is contained in:
1 parent
f21fdfd729
commit
808a78afa8
2 files changed
+12
-7
No files matched your search
+8
-4
@@ -277,8 +277,10 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn a_preview_host_carries_room_port_expiry_and_signature() {
|
||||
let mut config = Config::default();
|
||||
config.preview_origin = "https://preview.example.com".into();
|
||||
let config = Config {
|
||||
preview_origin: "https://preview.example.com".into(),
|
||||
..Default::default()
|
||||
};
|
||||
let (secrets, path) = secrets();
|
||||
let url = url(&config, &secrets, "room123", 5173).expect("url");
|
||||
let host = url
|
||||
@@ -296,8 +298,10 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn the_old_host_shape_is_not_accepted() {
|
||||
let mut config = Config::default();
|
||||
config.preview_origin = "https://preview.example.com".into();
|
||||
let config = Config {
|
||||
preview_origin: "https://preview.example.com".into(),
|
||||
..Default::default()
|
||||
};
|
||||
assert!(
|
||||
target_of_host(
|
||||
&config,
|
||||
|
||||
Reference in new issue
Block a user