{:ok, %{"notifications" => marker}} =
Pleroma.Marker.upsert(
user,
- %{"notifications" => %{"last_read_id" => "69420"}}
+ %{"notifications" => %{"last_read_id" => "69420", "unread_count" => 7}}
)
response =
assert response == %{
"notifications" => %{
"last_read_id" => "69420",
+ "unread_count" => 7,
"updated_at" => NaiveDateTime.to_iso8601(marker.updated_at),
"version" => 0
}
"notifications" => %{
"last_read_id" => "69420",
"updated_at" => _,
- "version" => 0
+ "version" => 0,
+ "unread_count" => 0
}
} = response
end
assert response == %{
"notifications" => %{
"last_read_id" => "69888",
+ "unread_count" => 0,
"updated_at" => NaiveDateTime.to_iso8601(marker.updated_at),
"version" => 0
}