Update Handling Test: Fix for re-used update ids.
This commit is contained in:
parent
9438f83f83
commit
1e7ca24430
@ -106,11 +106,13 @@ test "it works with custom profile fields" do
|
|||||||
Pleroma.Config.put([:instance, :max_remote_account_fields], 2)
|
Pleroma.Config.put([:instance, :max_remote_account_fields], 2)
|
||||||
|
|
||||||
update_data =
|
update_data =
|
||||||
put_in(update_data, ["object", "attachment"], [
|
update_data
|
||||||
|
|> put_in(["object", "attachment"], [
|
||||||
%{"name" => "foo", "type" => "PropertyValue", "value" => "bar"},
|
%{"name" => "foo", "type" => "PropertyValue", "value" => "bar"},
|
||||||
%{"name" => "foo11", "type" => "PropertyValue", "value" => "bar11"},
|
%{"name" => "foo11", "type" => "PropertyValue", "value" => "bar11"},
|
||||||
%{"name" => "foo22", "type" => "PropertyValue", "value" => "bar22"}
|
%{"name" => "foo22", "type" => "PropertyValue", "value" => "bar22"}
|
||||||
])
|
])
|
||||||
|
|> Map.put("id", update_data["id"] <> ".")
|
||||||
|
|
||||||
{:ok, _} = Transmogrifier.handle_incoming(update_data)
|
{:ok, _} = Transmogrifier.handle_incoming(update_data)
|
||||||
|
|
||||||
@ -121,7 +123,10 @@ test "it works with custom profile fields" do
|
|||||||
%{"name" => "foo1", "value" => "updated"}
|
%{"name" => "foo1", "value" => "updated"}
|
||||||
]
|
]
|
||||||
|
|
||||||
update_data = put_in(update_data, ["object", "attachment"], [])
|
update_data =
|
||||||
|
update_data
|
||||||
|
|> put_in(["object", "attachment"], [])
|
||||||
|
|> Map.put("id", update_data["id"] <> ".")
|
||||||
|
|
||||||
{:ok, _} = Transmogrifier.handle_incoming(update_data)
|
{:ok, _} = Transmogrifier.handle_incoming(update_data)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user