Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F8613734
safe_jsonb_set_test.exs
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
569 B
Referenced Files
None
Subscribers
None
safe_jsonb_set_test.exs
View Options
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule
Pleroma.SafeJsonbSetTest
do
use
Pleroma.DataCase
,
async
:
true
test
"it doesn't wipe the object when asked to set the value to NULL"
do
assert
%{
rows
:
[[%{
"key"
=>
"value"
,
"test"
=>
nil
}]]}
=
Ecto.Adapters.SQL
.
query!
(
Pleroma.Repo
,
"select safe_jsonb_set('{\"key\": \"value\"}'::jsonb, '{test}', NULL);"
,
[]
)
end
end
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 25, 7:04 PM (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
541747
Default Alt Text
safe_jsonb_set_test.exs (569 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment