Merge branch 'feature/1854-emoji-pagination' into 'develop'
[akkoma] / test / safe_jsonb_set_test.exs
1 defmodule Pleroma.SafeJsonbSetTest do
2 use Pleroma.DataCase
3
4 test "it doesn't wipe the object when asked to set the value to NULL" do
5 assert %{rows: [[%{"key" => "value", "test" => nil}]]} =
6 Ecto.Adapters.SQL.query!(
7 Pleroma.Repo,
8 "select safe_jsonb_set('{\"key\": \"value\"}'::jsonb, '{test}', NULL);",
9 []
10 )
11 end
12 end