Skip to content

Commit cb48c43

Browse files
committedMar 7, 2021
fix redirect url test
1 parent b0d66b1 commit cb48c43

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

‎src/docbuilder/rustwide_builder.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -822,8 +822,7 @@ mod tests {
822822

823823
// default target was built and is accessible
824824
assert!(storage.exists(&format!("{}/{}/index.html", base, crate_))?);
825-
let default_target_url = format!("/{0}/{1}/{0}", crate_, version);
826-
assert_success(&default_target_url, web)?;
825+
assert_success(&format!("/{0}/{1}/{0}", crate_, version), web)?;
827826

828827
// other targets too
829828
for target in DEFAULT_TARGETS {
@@ -834,7 +833,11 @@ mod tests {
834833

835834
if target == &default_target {
836835
assert!(!target_docs_present);
837-
assert_redirect(&target_url, &default_target_url, web)?;
836+
assert_redirect(
837+
&target_url,
838+
&format!("/{0}/{1}/{0}/index.html", crate_, version),
839+
web,
840+
)?;
838841
} else {
839842
assert!(target_docs_present);
840843
assert_success(&target_url, web)?;

0 commit comments

Comments
 (0)