2451: feat(API-keys): Change immutable_field error message r=Kerollmops a=ManyTheFish

Change the immutable_field error message to fit the recent changes in the spec:
aa0a148ee3..84a9baff68



Co-authored-by: ManyTheFish <many@meilisearch.com>
This commit is contained in:
bors[bot] 2022-06-02 09:26:36 +00:00 committed by GitHub
commit 7e3d5ebc8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -1150,7 +1150,7 @@ async fn error_patch_api_key_indexes() {
let (response, code) = server.patch_api_key(&uid, content).await;
assert_eq!(400, code, "{:?}", &response);
let expected = json!({"message": "`indexes` field cannot be modified for the given resource.",
let expected = json!({"message": "The `indexes` field cannot be modified for the given resource.",
"code": "immutable_field",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#immutable_field"
@ -1206,7 +1206,7 @@ async fn error_patch_api_key_actions() {
let (response, code) = server.patch_api_key(&uid, content).await;
assert_eq!(400, code, "{:?}", &response);
let expected = json!({"message": "`actions` field cannot be modified for the given resource.",
let expected = json!({"message": "The `actions` field cannot be modified for the given resource.",
"code": "immutable_field",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#immutable_field"
@ -1254,7 +1254,7 @@ async fn error_patch_api_key_expiration_date() {
let (response, code) = server.patch_api_key(&uid, content).await;
assert_eq!(400, code, "{:?}", &response);
let expected = json!({"message": "`expiresAt` field cannot be modified for the given resource.",
let expected = json!({"message": "The `expiresAt` field cannot be modified for the given resource.",
"code": "immutable_field",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#immutable_field"