Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

13 linhas
397B

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