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()
"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"]
}
]
}
"id" => user.id,
"nickname" => user.nickname,
"roles" => %{"admin" => false, "moderator" => false},
- "local" => true
+ "local" => true,
+ "tags" => []
}
]
}
"id" => user.id,
"nickname" => user.nickname,
"roles" => %{"admin" => false, "moderator" => false},
- "local" => true
+ "local" => true,
+ "tags" => []
}
]
}
"id" => user2.id,
"nickname" => user2.nickname,
"roles" => %{"admin" => false, "moderator" => false},
- "local" => true
+ "local" => true,
+ "tags" => []
}
]
}
"id" => user.id,
"nickname" => user.nickname,
"roles" => %{"admin" => false, "moderator" => false},
- "local" => true
+ "local" => true,
+ "tags" => []
}
]
}
"count" => 2,
"page_size" => 50,
"users" => [
- %{
- "deactivated" => admin.info.deactivated,
- "id" => admin.id,
- "nickname" => admin.nickname,
- "roles" => %{"admin" => true, "moderator" => false},
- "local" => true
- },
%{
"deactivated" => user.info.deactivated,
"id" => user.id,
"nickname" => user.nickname,
"roles" => %{"admin" => false, "moderator" => false},
- "local" => true
+ "local" => true,
+ "tags" => []
+ },
+ %{
+ "deactivated" => admin.info.deactivated,
+ "id" => admin.id,
+ "nickname" => admin.nickname,
+ "roles" => %{"admin" => true, "moderator" => false},
+ "local" => true,
+ "tags" => []
}
]
}
"id" => user.id,
"nickname" => user.nickname,
"roles" => %{"admin" => false, "moderator" => false},
- "local" => true
+ "local" => true,
+ "tags" => []
}
end
end