Skip to content

Commit e7b52bb

Browse files
committed
Rename test and add a comment explaining an important part
This makes the name less confusing but still ensures we have a regression test for the specific bug mentioned.
1 parent 5230078 commit e7b52bb

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/tests/krate.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,11 +631,14 @@ fn new_with_renamed_dependency() {
631631
}
632632

633633
#[test]
634-
fn new_krate_non_canon_crate_name_dependencies() {
634+
fn new_krate_with_dependency() {
635635
let (app, _, user, token) = TestApp::with_proxy().with_token();
636636

637637
app.db(|conn| {
638638
// Insert a crate directly into the database so that new_dep can depend on it
639+
// The name choice of `foo-dep` is important! It has the property of
640+
// name != canon_crate_name(name) and is a regression test for
641+
// https://github.com/rust-lang/crates.io/issues/651
639642
CrateBuilder::new("foo-dep", user.as_model().id).expect_build(&conn);
640643
});
641644

0 commit comments

Comments
 (0)