Skip to content

Commit

Permalink
use example.com url
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchantey committed Dec 14, 2024
1 parent d4e72b0 commit 27f69f9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ crates/**/target
benches/**/target
tools/**/target
**/*.rs.bk
rustc-ice-*

# Cargo
Cargo.lock
Expand Down
18 changes: 9 additions & 9 deletions crates/bevy_asset/src/http_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,53 +192,53 @@ mod tests {
fn make_http_uri() {
assert_eq!(
HttpSourceAssetReader::Http
.make_uri(Path::new("s3.johanhelsing.studio/dump/favicon.png"))
.make_uri(Path::new("example.com/favicon.png"))
.to_str()
.unwrap(),
"http://s3.johanhelsing.studio/dump/favicon.png"
"http://example.com/favicon.png"
);
}

#[test]
fn make_https_uri() {
assert_eq!(
HttpSourceAssetReader::Https
.make_uri(Path::new("s3.johanhelsing.studio/dump/favicon.png"))
.make_uri(Path::new("example.com/favicon.png"))
.to_str()
.unwrap(),
"https://s3.johanhelsing.studio/dump/favicon.png"
"https://example.com/favicon.png"
);
}

#[test]
fn make_http_meta_uri() {
assert_eq!(
HttpSourceAssetReader::Http
.make_meta_uri(Path::new("s3.johanhelsing.studio/dump/favicon.png"))
.make_meta_uri(Path::new("example.com/favicon.png"))
.expect("cannot create meta uri")
.to_str()
.unwrap(),
"http://s3.johanhelsing.studio/dump/favicon.png.meta"
"http://example.com/favicon.png.meta"
);
}

#[test]
fn make_https_meta_uri() {
assert_eq!(
HttpSourceAssetReader::Https
.make_meta_uri(Path::new("s3.johanhelsing.studio/dump/favicon.png"))
.make_meta_uri(Path::new("example.com/favicon.png"))
.expect("cannot create meta uri")
.to_str()
.unwrap(),
"https://s3.johanhelsing.studio/dump/favicon.png.meta"
"https://example.com/favicon.png.meta"
);
}

#[test]
fn make_https_without_extension_meta_uri() {
assert_eq!(
HttpSourceAssetReader::Https
.make_meta_uri(Path::new("s3.johanhelsing.studio/dump/favicon")),
.make_meta_uri(Path::new("example.com/favicon")),
None
);
}
Expand Down

0 comments on commit 27f69f9

Please sign in to comment.