From 214400aaea33efabefae82b9f3ef0e10767f4394 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 5 Aug 2020 12:08:52 +0200 Subject: [PATCH] Fix API test Signed-off-by: Thomas Citharel --- test/graphql/api/search_test.exs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/graphql/api/search_test.exs b/test/graphql/api/search_test.exs index 849591489..f4468746e 100644 --- a/test/graphql/api/search_test.exs +++ b/test/graphql/api/search_test.exs @@ -47,13 +47,13 @@ defmodule Mobilizon.GraphQL.API.SearchTest do test "search events" do with_mock Events, - build_events_for_search: fn "toto", 1, 10 -> + build_events_for_search: fn %{term: "toto"}, 1, 10 -> %Page{total: 1, elements: [%Event{title: "super toto event"}]} end do assert {:ok, %{total: 1, elements: [%Event{title: "super toto event"}]}} = - Search.search_events("toto", 1, 10) + Search.search_events(%{term: "toto"}, 1, 10) - assert_called(Events.build_events_for_search("toto", 1, 10)) + assert_called(Events.build_events_for_search(%{term: "toto"}, 1, 10)) end end end