Commit 257d8e78 authored by Maxim Filippov's avatar Maxim Filippov 🌚
Browse files

Add tags

parent 4872914d
......@@ -22,7 +22,8 @@ def render("show.json", %{user: user}) do
"nickname" => user.nickname,
"deactivated" => user.info.deactivated,
"local" => user.local,
"roles" => Info.roles(user.info)
"roles" => Info.roles(user.info),
"tags" => user.tags
}
end
end
......@@ -334,7 +334,7 @@ test "/api/pleroma/admin/password_reset" do
describe "GET /api/pleroma/admin/users" do
test "renders users array for the first page" do
admin = insert(:user, info: %{is_admin: true})
user = insert(:user, local: false)
user = insert(:user, local: false, tags: ["foo", "bar"])
conn =
build_conn()
......@@ -350,14 +350,16 @@ test "renders users array for the first page" do
"id" => admin.id,
"nickname" => admin.nickname,
"roles" => %{"admin" => true, "moderator" => false},
"local" => true
"local" => true,
"tags" => []
},
%{
"deactivated" => user.info.deactivated,
"id" => user.id,
"nickname" => user.nickname,
"roles" => %{"admin" => false, "moderator" => false},
"local" => false
"local" => false,
"tags" => ["foo", "bar"]
}
]
}
......@@ -397,7 +399,8 @@ test "regular search" do
"id" => user.id,
"nickname" => user.nickname,
"roles" => %{"admin" => false, "moderator" => false},
"local" => true
"local" => true,
"tags" => []
}
]
}
......@@ -422,7 +425,8 @@ test "regular search with page size" do
"id" => user.id,
"nickname" => user.nickname,
"roles" => %{"admin" => false, "moderator" => false},
"local" => true
"local" => true,
"tags" => []
}
]
}
......@@ -441,7 +445,8 @@ test "regular search with page size" do
"id" => user2.id,
"nickname" => user2.nickname,
"roles" => %{"admin" => false, "moderator" => false},
"local" => true
"local" => true,
"tags" => []
}
]
}
......@@ -467,7 +472,8 @@ test "only local users" do
"id" => user.id,
"nickname" => user.nickname,
"roles" => %{"admin" => false, "moderator" => false},
"local" => true
"local" => true,
"tags" => []
}
]
}
......@@ -493,14 +499,16 @@ test "only local users with no query" do
"id" => admin.id,
"nickname" => admin.nickname,
"roles" => %{"admin" => true, "moderator" => false},
"local" => true
"local" => true,
"tags" => []
},
%{
"deactivated" => user.info.deactivated,
"id" => user.id,
"nickname" => user.nickname,
"roles" => %{"admin" => false, "moderator" => false},
"local" => true
"local" => true,
"tags" => []
}
]
}
......@@ -522,7 +530,8 @@ test "PATCH /api/pleroma/admin/users/:nickname/toggle_activation" do
"id" => user.id,
"nickname" => user.nickname,
"roles" => %{"admin" => false, "moderator" => false},
"local" => true
"local" => true,
"tags" => []
}
end
end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment