Skip to content

Commit 819f7fa

Browse files
authored
Merge pull request #8226 from rust-lang/renovate/insta-1.x
Update Rust crate insta to v1.36.1
2 parents fb16b46 + 8189eee commit 819f7fa

File tree

16 files changed

+50
-50
lines changed

16 files changed

+50
-50
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,6 @@ crates_io_tarball = { path = "crates_io_tarball", features = ["builder"] }
130130
crates_io_test_db = { path = "crates_io_test_db" }
131131
claims = "=0.7.1"
132132
googletest = "=0.11.0"
133-
insta = { version = "=1.35.1", features = ["json", "redactions"] }
133+
insta = { version = "=1.36.1", features = ["json", "redactions"] }
134134
regex = "=1.10.3"
135135
tokio = "=1.36.0"

crates_io_cdn_logs/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ tracing = "=0.1.40"
2323
claims = "=0.7.1"
2424
clap = { version = "=4.5.1", features = ["derive"] }
2525
criterion = { version = "=0.5.1", features = ["async_tokio"] }
26-
insta = "=1.35.1"
26+
insta = "=1.36.1"
2727
tokio = { version = "=1.36.0", features = ["fs", "macros", "rt", "rt-multi-thread"] }
2828
tracing-subscriber = { version = "=0.3.18", features = ["env-filter"] }
2929

crates_io_cdn_logs/src/cloudfront.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ mod tests {
125125
use super::*;
126126
use crate::test_utils::*;
127127
use claims::{assert_err, assert_ok};
128-
use insta::{assert_debug_snapshot, assert_display_snapshot};
128+
use insta::{assert_debug_snapshot, assert_snapshot};
129129
use std::io::Cursor;
130130

131131
#[tokio::test]
@@ -217,6 +217,6 @@ mod tests {
217217
));
218218
let error = assert_err!(count_downloads(&mut cursor).await);
219219

220-
assert_display_snapshot!(error, @"Unsupported version: 2.0");
220+
assert_snapshot!(error, @"Unsupported version: 2.0");
221221
}
222222
}

crates_io_cdn_logs/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ mod tests {
4848
use crate::compression::Decompressor;
4949
use crate::test_utils::*;
5050
use claims::{assert_err, assert_ok};
51-
use insta::{assert_debug_snapshot, assert_display_snapshot};
51+
use insta::{assert_debug_snapshot, assert_snapshot};
5252
use std::io::Cursor;
5353

5454
#[tokio::test]
@@ -199,6 +199,6 @@ mod tests {
199199

200200
let mut cursor = Cursor::new(b"foo");
201201
let error = assert_err!(count_downloads(&mut cursor).await);
202-
assert_display_snapshot!(error, @"Failed to determine log file format. Unrecognized first byte: 102.");
202+
assert_snapshot!(error, @"Failed to determine log file format. Unrecognized first byte: 102.");
203203
}
204204
}

crates_io_markdown/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ htmlescape = "=0.3.1"
1919
url = "=2.5.0"
2020

2121
[dev-dependencies]
22-
insta = "=1.35.1"
22+
insta = "=1.36.1"

src/tests/krate/following.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::builders::CrateBuilder;
22
use crate::util::{RequestHelper, TestApp};
33
use googletest::prelude::*;
44
use http::StatusCode;
5-
use insta::assert_display_snapshot;
5+
use insta::assert_snapshot;
66

77
fn assert_is_following(crate_name: &str, expected: bool, user: &impl RequestHelper) {
88
let response = user.get::<()>(&format!("/api/v1/crates/{crate_name}/following"));
@@ -34,15 +34,15 @@ fn test_unauthenticated_requests() {
3434

3535
let response = anon.get::<()>(&format!("/api/v1/crates/{CRATE_NAME}/following"));
3636
assert_eq!(response.status(), StatusCode::FORBIDDEN);
37-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"must be logged in to perform that action"}]}"###);
37+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"must be logged in to perform that action"}]}"###);
3838

3939
let response = anon.put::<()>(&format!("/api/v1/crates/{CRATE_NAME}/follow"), b"" as &[u8]);
4040
assert_eq!(response.status(), StatusCode::FORBIDDEN);
41-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"must be logged in to perform that action"}]}"###);
41+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"must be logged in to perform that action"}]}"###);
4242

4343
let response = anon.delete::<()>(&format!("/api/v1/crates/{CRATE_NAME}/follow"));
4444
assert_eq!(response.status(), StatusCode::FORBIDDEN);
45-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"must be logged in to perform that action"}]}"###);
45+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"must be logged in to perform that action"}]}"###);
4646
}
4747

4848
#[test]
@@ -84,15 +84,15 @@ fn test_unknown_crate() {
8484

8585
let response = user.get::<()>("/api/v1/crates/unknown-crate/following");
8686
assert_eq!(response.status(), StatusCode::NOT_FOUND);
87-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `unknown-crate` does not exist"}]}"###);
87+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `unknown-crate` does not exist"}]}"###);
8888

8989
let response = user.put::<()>("/api/v1/crates/unknown-crate/follow", b"" as &[u8]);
9090
assert_eq!(response.status(), StatusCode::NOT_FOUND);
91-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `unknown-crate` does not exist"}]}"###);
91+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `unknown-crate` does not exist"}]}"###);
9292

9393
let response = user.delete::<()>("/api/v1/crates/unknown-crate/follow");
9494
assert_eq!(response.status(), StatusCode::NOT_FOUND);
95-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `unknown-crate` does not exist"}]}"###);
95+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `unknown-crate` does not exist"}]}"###);
9696
}
9797

9898
#[test]

src/tests/krate/publish/dependencies.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::builders::{CrateBuilder, DependencyBuilder, PublishBuilder};
22
use crate::util::{RequestHelper, TestApp};
33
use googletest::prelude::*;
44
use http::StatusCode;
5-
use insta::{assert_display_snapshot, assert_json_snapshot};
5+
use insta::{assert_json_snapshot, assert_snapshot};
66

77
#[test]
88
fn invalid_dependency_name() {
@@ -330,7 +330,7 @@ fn test_dep_limit() {
330330

331331
let response = token.publish_crate(crate_to_publish);
332332
assert_eq!(response.status(), StatusCode::BAD_REQUEST);
333-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"crates.io only allows a maximum number of 1 dependencies.\n\nIf you have a use case that requires an increase of this limit, please send us an email to help@crates.io to discuss the details."}]}"###);
333+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"crates.io only allows a maximum number of 1 dependencies.\n\nIf you have a use case that requires an increase of this limit, please send us an email to help@crates.io to discuss the details."}]}"###);
334334

335335
let crate_to_publish =
336336
PublishBuilder::new("foo", "1.0.0").dependency(DependencyBuilder::new("dep-a"));

src/tests/owners.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use crates_io::{
1616
use chrono::{Duration, Utc};
1717
use diesel::prelude::*;
1818
use http::StatusCode;
19-
use insta::assert_display_snapshot;
19+
use insta::assert_snapshot;
2020

2121
#[derive(Deserialize)]
2222
struct TeamResponse {
@@ -336,15 +336,15 @@ fn test_unknown_crate() {
336336

337337
let response = user.get::<()>("/api/v1/crates/unknown/owners");
338338
assert_eq!(response.status(), StatusCode::NOT_FOUND);
339-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `unknown` does not exist"}]}"###);
339+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `unknown` does not exist"}]}"###);
340340

341341
let response = user.get::<()>("/api/v1/crates/unknown/owner_team");
342342
assert_eq!(response.status(), StatusCode::NOT_FOUND);
343-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `unknown` does not exist"}]}"###);
343+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `unknown` does not exist"}]}"###);
344344

345345
let response = user.get::<()>("/api/v1/crates/unknown/owner_user");
346346
assert_eq!(response.status(), StatusCode::NOT_FOUND);
347-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `unknown` does not exist"}]}"###);
347+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `unknown` does not exist"}]}"###);
348348
}
349349

350350
#[test]

src/tests/routes/crates/downloads.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::util::{MockAnonymousUser, RequestHelper, TestApp};
33
use chrono::{Duration, Utc};
44
use crates_io::views::EncodableVersionDownload;
55
use http::StatusCode;
6-
use insta::{assert_display_snapshot, assert_json_snapshot};
6+
use insta::{assert_json_snapshot, assert_snapshot};
77

88
#[derive(Deserialize)]
99
struct Downloads {
@@ -131,7 +131,7 @@ fn test_crate_downloads() {
131131
// check different crate name
132132
let response = anon.get::<()>("/api/v1/crates/bar/downloads");
133133
assert_eq!(response.status(), StatusCode::NOT_FOUND);
134-
assert_display_snapshot!(
134+
assert_snapshot!(
135135
response.text(),
136136
@r###"{"errors":[{"detail":"crate `bar` does not exist"}]}"###
137137
);
@@ -170,7 +170,7 @@ fn test_version_downloads() {
170170
// check different crate name
171171
let response = anon.get::<()>("/api/v1/crates/bar/1.0.0/downloads");
172172
assert_eq!(response.status(), StatusCode::NOT_FOUND);
173-
assert_display_snapshot!(
173+
assert_snapshot!(
174174
response.text(),
175175
@r###"{"errors":[{"detail":"crate `bar` does not exist"}]}"###
176176
);
@@ -183,15 +183,15 @@ fn test_version_downloads() {
183183
// check missing version
184184
let response = anon.get::<()>("/api/v1/crates/foo/2.0.0/downloads");
185185
assert_eq!(response.status(), StatusCode::NOT_FOUND);
186-
assert_display_snapshot!(
186+
assert_snapshot!(
187187
response.text(),
188188
@r###"{"errors":[{"detail":"crate `foo` does not have a version `2.0.0`"}]}"###
189189
);
190190

191191
// check invalid version
192192
let response = anon.get::<()>("/api/v1/crates/foo/invalid-version/downloads");
193193
assert_eq!(response.status(), StatusCode::NOT_FOUND);
194-
assert_display_snapshot!(
194+
assert_snapshot!(
195195
response.text(),
196196
@r###"{"errors":[{"detail":"crate `foo` does not have a version `invalid-version`"}]}"###
197197
);

src/tests/routes/crates/owners/add.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::owners::expire_invitation;
33
use crate::util::{RequestHelper, TestApp};
44
use crates_io::models::token::{CrateScope, EndpointScope};
55
use http::StatusCode;
6-
use insta::assert_display_snapshot;
6+
use insta::assert_snapshot;
77

88
// This is testing Cargo functionality! ! !
99
// specifically functions modify_owners and add_owners
@@ -209,7 +209,7 @@ fn test_owner_change_with_legacy_field() {
209209
let input = r#"{"users": ["user2"]}"#;
210210
let response = user1.put::<()>("/api/v1/crates/foo/owners", input.as_bytes());
211211
assert_eq!(response.status(), StatusCode::OK);
212-
assert_display_snapshot!(response.text(), @r###"{"msg":"user user2 has been invited to be an owner of crate foo","ok":true}"###);
212+
assert_snapshot!(response.text(), @r###"{"msg":"user user2 has been invited to be an owner of crate foo","ok":true}"###);
213213
}
214214

215215
#[test]
@@ -222,19 +222,19 @@ fn test_owner_change_with_invalid_json() {
222222
let input = r#"{"owners": ["foo", }"#;
223223
let response = user.put::<()>("/api/v1/crates/foo/owners", input.as_bytes());
224224
assert_eq!(response.status(), StatusCode::BAD_REQUEST);
225-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"Failed to parse the request body as JSON: owners[1]: expected value at line 1 column 20"}]}"###);
225+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"Failed to parse the request body as JSON: owners[1]: expected value at line 1 column 20"}]}"###);
226226

227227
// `owners` is not an array
228228
let input = r#"{"owners": "foo"}"#;
229229
let response = user.put::<()>("/api/v1/crates/foo/owners", input.as_bytes());
230230
assert_eq!(response.status(), StatusCode::UNPROCESSABLE_ENTITY);
231-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"Failed to deserialize the JSON body into the target type: owners: invalid type: string \"foo\", expected a sequence at line 1 column 16"}]}"###);
231+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"Failed to deserialize the JSON body into the target type: owners: invalid type: string \"foo\", expected a sequence at line 1 column 16"}]}"###);
232232

233233
// missing `owners` and/or `users` fields
234234
let input = r#"{}"#;
235235
let response = user.put::<()>("/api/v1/crates/foo/owners", input.as_bytes());
236236
assert_eq!(response.status(), StatusCode::UNPROCESSABLE_ENTITY);
237-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"Failed to deserialize the JSON body into the target type: missing field `owners` at line 1 column 2"}]}"###);
237+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"Failed to deserialize the JSON body into the target type: missing field `owners` at line 1 column 2"}]}"###);
238238
}
239239

240240
#[test]
@@ -327,7 +327,7 @@ fn test_unknown_crate() {
327327

328328
let response = user.put::<()>("/api/v1/crates/unknown/owners", body);
329329
assert_eq!(response.status(), StatusCode::NOT_FOUND);
330-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `unknown` does not exist"}]}"###);
330+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `unknown` does not exist"}]}"###);
331331
}
332332

333333
#[test]
@@ -339,7 +339,7 @@ fn test_unknown_user() {
339339
let body = serde_json::to_vec(&json!({ "owners": ["unknown"] })).unwrap();
340340
let response = cookie.put::<()>("/api/v1/crates/foo/owners", body);
341341
assert_eq!(response.status(), StatusCode::BAD_REQUEST);
342-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"could not find user with login `unknown`"}]}"###);
342+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"could not find user with login `unknown`"}]}"###);
343343
}
344344

345345
#[test]
@@ -351,5 +351,5 @@ fn test_unknown_team() {
351351
let body = serde_json::to_vec(&json!({ "owners": ["github:unknown:unknown"] })).unwrap();
352352
let response = cookie.put::<()>("/api/v1/crates/foo/owners", body);
353353
assert_eq!(response.status(), StatusCode::BAD_REQUEST);
354-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"could not find the github team unknown/unknown"}]}"###);
354+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"could not find the github team unknown/unknown"}]}"###);
355355
}

src/tests/routes/crates/owners/remove.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::builders::CrateBuilder;
22
use crate::util::{RequestHelper, TestApp};
33
use http::StatusCode;
4-
use insta::assert_display_snapshot;
4+
use insta::assert_snapshot;
55

66
#[test]
77
fn test_owner_change_with_invalid_json() {
@@ -13,19 +13,19 @@ fn test_owner_change_with_invalid_json() {
1313
let input = r#"{"owners": ["foo", }"#;
1414
let response = user.delete_with_body::<()>("/api/v1/crates/foo/owners", input.as_bytes());
1515
assert_eq!(response.status(), StatusCode::BAD_REQUEST);
16-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"Failed to parse the request body as JSON: owners[1]: expected value at line 1 column 20"}]}"###);
16+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"Failed to parse the request body as JSON: owners[1]: expected value at line 1 column 20"}]}"###);
1717

1818
// `owners` is not an array
1919
let input = r#"{"owners": "foo"}"#;
2020
let response = user.delete_with_body::<()>("/api/v1/crates/foo/owners", input.as_bytes());
2121
assert_eq!(response.status(), StatusCode::UNPROCESSABLE_ENTITY);
22-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"Failed to deserialize the JSON body into the target type: owners: invalid type: string \"foo\", expected a sequence at line 1 column 16"}]}"###);
22+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"Failed to deserialize the JSON body into the target type: owners: invalid type: string \"foo\", expected a sequence at line 1 column 16"}]}"###);
2323

2424
// missing `owners` and/or `users` fields
2525
let input = r#"{}"#;
2626
let response = user.delete_with_body::<()>("/api/v1/crates/foo/owners", input.as_bytes());
2727
assert_eq!(response.status(), StatusCode::UNPROCESSABLE_ENTITY);
28-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"Failed to deserialize the JSON body into the target type: missing field `owners` at line 1 column 2"}]}"###);
28+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"Failed to deserialize the JSON body into the target type: missing field `owners` at line 1 column 2"}]}"###);
2929
}
3030

3131
#[test]
@@ -38,7 +38,7 @@ fn test_unknown_crate() {
3838

3939
let response = user.delete_with_body::<()>("/api/v1/crates/unknown/owners", body);
4040
assert_eq!(response.status(), StatusCode::NOT_FOUND);
41-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `unknown` does not exist"}]}"###);
41+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `unknown` does not exist"}]}"###);
4242
}
4343

4444
#[test]
@@ -50,7 +50,7 @@ fn test_unknown_user() {
5050
let body = serde_json::to_vec(&json!({ "owners": ["unknown"] })).unwrap();
5151
let response = cookie.delete_with_body::<()>("/api/v1/crates/foo/owners", body);
5252
assert_eq!(response.status(), StatusCode::BAD_REQUEST);
53-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"could not find user with login `unknown`"}]}"###);
53+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"could not find user with login `unknown`"}]}"###);
5454
}
5555

5656
#[test]
@@ -62,5 +62,5 @@ fn test_unknown_team() {
6262
let body = serde_json::to_vec(&json!({ "owners": ["github:unknown:unknown"] })).unwrap();
6363
let response = cookie.delete_with_body::<()>("/api/v1/crates/foo/owners", body);
6464
assert_eq!(response.status(), StatusCode::BAD_REQUEST);
65-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"could not find team with login `github:unknown:unknown`"}]}"###);
65+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"could not find team with login `github:unknown:unknown`"}]}"###);
6666
}

src/tests/routes/crates/read.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::builders::{CrateBuilder, PublishBuilder, VersionBuilder};
22
use crate::util::{RequestHelper, TestApp};
33
use diesel::prelude::*;
44
use http::StatusCode;
5-
use insta::{assert_display_snapshot, assert_json_snapshot};
5+
use insta::{assert_json_snapshot, assert_snapshot};
66

77
#[test]
88
fn show() {
@@ -81,7 +81,7 @@ fn test_missing() {
8181

8282
let response = anon.get::<()>("/api/v1/crates/missing");
8383
assert_eq!(response.status(), StatusCode::NOT_FOUND);
84-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `missing` does not exist"}]}"###);
84+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `missing` does not exist"}]}"###);
8585
}
8686

8787
#[test]

src/tests/routes/crates/reverse_dependencies.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::builders::{CrateBuilder, VersionBuilder};
22
use crate::util::{RequestHelper, TestApp};
33
use http::StatusCode;
4-
use insta::{assert_display_snapshot, assert_json_snapshot};
4+
use insta::{assert_json_snapshot, assert_snapshot};
55

66
#[test]
77
fn reverse_dependencies() {
@@ -216,5 +216,5 @@ fn test_unknown_crate() {
216216

217217
let response = anon.get::<()>("/api/v1/crates/unknown/reverse_dependencies");
218218
assert_eq!(response.status(), StatusCode::NOT_FOUND);
219-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `unknown` does not exist"}]}"###);
219+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `unknown` does not exist"}]}"###);
220220
}

src/tests/routes/crates/versions/list.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crates_io::views::EncodableVersion;
55
use diesel::{prelude::*, update};
66
use googletest::prelude::*;
77
use http::StatusCode;
8-
use insta::{assert_display_snapshot, assert_json_snapshot};
8+
use insta::{assert_json_snapshot, assert_snapshot};
99

1010
#[test]
1111
fn versions() {
@@ -41,7 +41,7 @@ fn test_unknown_crate() {
4141

4242
let response = anon.get::<()>("/api/v1/crates/unknown/versions");
4343
assert_eq!(response.status(), StatusCode::NOT_FOUND);
44-
assert_display_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `unknown` does not exist"}]}"###);
44+
assert_snapshot!(response.text(), @r###"{"errors":[{"detail":"crate `unknown` does not exist"}]}"###);
4545
}
4646

4747
#[test]

0 commit comments

Comments
 (0)