setup do: clear_config([:mrf_vocabulary, :accept])
test "it accepts based on parent activity type" do
- Pleroma.Config.put([:mrf_vocabulary, :accept], ["Like"])
+ clear_config([:mrf_vocabulary, :accept], ["Like"])
message = %{
"type" => "Like",
end
test "it accepts based on child object type" do
- Pleroma.Config.put([:mrf_vocabulary, :accept], ["Create", "Note"])
+ clear_config([:mrf_vocabulary, :accept], ["Create", "Note"])
message = %{
"type" => "Create",
end
test "it does not accept disallowed child objects" do
- Pleroma.Config.put([:mrf_vocabulary, :accept], ["Create", "Note"])
+ clear_config([:mrf_vocabulary, :accept], ["Create", "Note"])
message = %{
"type" => "Create",
end
test "it does not accept disallowed parent types" do
- Pleroma.Config.put([:mrf_vocabulary, :accept], ["Announce", "Note"])
+ clear_config([:mrf_vocabulary, :accept], ["Announce", "Note"])
message = %{
"type" => "Create",
setup do: clear_config([:mrf_vocabulary, :reject])
test "it rejects based on parent activity type" do
- Pleroma.Config.put([:mrf_vocabulary, :reject], ["Like"])
+ clear_config([:mrf_vocabulary, :reject], ["Like"])
message = %{
"type" => "Like",
end
test "it rejects based on child object type" do
- Pleroma.Config.put([:mrf_vocabulary, :reject], ["Note"])
+ clear_config([:mrf_vocabulary, :reject], ["Note"])
message = %{
"type" => "Create",
end
test "it passes through objects that aren't disallowed" do
- Pleroma.Config.put([:mrf_vocabulary, :reject], ["Like"])
+ clear_config([:mrf_vocabulary, :reject], ["Like"])
message = %{
"type" => "Announce",