Skip to content

Commit adb0715

Browse files
committed
Have the test fn req_with_documentation always take documentation
Otherwise, it isn't really with documentation :) We can use new_req to create a version without a documentation link.
1 parent 19bd9fd commit adb0715

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/tests/all.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,10 +552,10 @@ fn new_req_with_documentation(
552552
app: Arc<App>,
553553
krate: &str,
554554
version: &str,
555-
documentation: Option<String>,
555+
documentation: &str,
556556
) -> MockRequest {
557557
let mut krate = ::krate(krate);
558-
krate.documentation = documentation;
558+
krate.documentation = Some(documentation.into());
559559
new_req_full(app, krate, version, Vec::new())
560560
}
561561

src/tests/krate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,7 +1603,7 @@ fn publish_after_removing_documentation() {
16031603
Arc::clone(&app),
16041604
"docscrate",
16051605
"0.2.1",
1606-
Some("http://foo.rs".to_owned()),
1606+
"http://foo.rs",
16071607
);
16081608
::sign_in_as(&mut req, &user);
16091609
let mut response = ok_resp!(middle.call(&mut req));
@@ -1621,7 +1621,7 @@ fn publish_after_removing_documentation() {
16211621

16221622
// 3. Remove the documentation
16231623
{
1624-
let mut req = ::new_req_with_documentation(Arc::clone(&app), "docscrate", "0.2.2", None);
1624+
let mut req = ::new_req(Arc::clone(&app), "docscrate", "0.2.2");
16251625
::sign_in_as(&mut req, &user);
16261626
let mut response = ok_resp!(middle.call(&mut req));
16271627
let json: GoodCrate = ::json(&mut response);

0 commit comments

Comments
 (0)