mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-04 18:38:15 +00:00
Update test for custom fields when name empty string
This commit is contained in:
parent
db6c5aa66a
commit
86bc83efe5
|
@ -364,6 +364,21 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do
|
||||||
|> assign(:user, user)
|
|> assign(:user, user)
|
||||||
|> patch("/api/v1/accounts/update_credentials", %{"fields_attributes" => fields})
|
|> patch("/api/v1/accounts/update_credentials", %{"fields_attributes" => fields})
|
||||||
|> json_response(403)
|
|> json_response(403)
|
||||||
|
|
||||||
|
fields = [
|
||||||
|
%{"name" => "foo", "value" => ""},
|
||||||
|
%{"name" => "", "value" => "bar"}
|
||||||
|
]
|
||||||
|
|
||||||
|
account =
|
||||||
|
conn
|
||||||
|
|> assign(:user, user)
|
||||||
|
|> patch("/api/v1/accounts/update_credentials", %{"fields_attributes" => fields})
|
||||||
|
|> json_response(200)
|
||||||
|
|
||||||
|
assert account["fields"] == [
|
||||||
|
%{"name" => "foo", "value" => ""}
|
||||||
|
]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue