Skip to content

Commit

Permalink
fix test (#4038)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertJoonas authored and ruslandoga committed May 1, 2024
1 parent 21b29be commit 42df4e0
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,15 @@ defmodule PlausibleWeb.Api.StatsController.SuggestionsTest do
"/api/stats/#{site.domain}/suggestions/hostname?q=host"
)

assert json_response(conn, 200) ==
[
%{"label" => "host-alice.example.com", "value" => "host-alice.example.com"},
%{"label" => "host-carol.example.com", "value" => "host-carol.example.com"},
%{"label" => "host-bob.example.com", "value" => "host-bob.example.com"}
]
results = json_response(conn, 200)

assert length(results) == 3

assert %{"label" => "host-alice.example.com", "value" => "host-alice.example.com"} in results

assert %{"label" => "host-carol.example.com", "value" => "host-carol.example.com"} in results

assert %{"label" => "host-bob.example.com", "value" => "host-bob.example.com"} in results

conn =
get(
Expand Down

0 comments on commit 42df4e0

Please sign in to comment.