From a09fae88209210cd7aa29cabb5f48005cb7889d1 Mon Sep 17 00:00:00 2001 From: Maksim Pechnikov Date: Sat, 31 Oct 2020 08:54:29 +0300 Subject: [PATCH] fix test --- test/pleroma/web/admin_api/controllers/user_controller_test.exs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/pleroma/web/admin_api/controllers/user_controller_test.exs b/test/pleroma/web/admin_api/controllers/user_controller_test.exs index 31319b5e5..2a4846e0b 100644 --- a/test/pleroma/web/admin_api/controllers/user_controller_test.exs +++ b/test/pleroma/web/admin_api/controllers/user_controller_test.exs @@ -379,7 +379,9 @@ defmodule Pleroma.Web.AdminAPI.UserControllerTest do describe "GET /api/pleroma/admin/users" do test "renders users array for the first page", %{conn: conn, admin: admin} do - user = insert(:user, local: false, tags: ["foo", "bar"]) + user = + insert(:user, local: false, tags: [build(:tag, name: "foo"), build(:tag, name: "bar")]) + user2 = insert(:user, is_approved: false, registration_reason: "I'm a chill dude") conn = get(conn, "/api/pleroma/admin/users?page=1") @@ -745,8 +747,8 @@ defmodule Pleroma.Web.AdminAPI.UserControllerTest do end test "load users with tags list", %{conn: conn} do - user1 = insert(:user, tags: ["first"]) - user2 = insert(:user, tags: ["second"]) + user1 = insert(:user, tags: [build(:tag, name: "first")]) + user2 = insert(:user, tags: [build(:tag, name: "second")]) insert(:user) insert(:user)