1 defmodule Pleroma.User.SearchTest do
4 describe "sanitise_domain/1" do
5 test "should remove url-reserved characters" do
7 ["example.com", "example.com"],
8 ["no spaces", "nospaces"],
10 ["dash-is-ok", "dash-is-ok"],
11 ["underscore_not_so_much", "underscorenotsomuch"],
14 ["a$b%s^o*l(u)t'e#l<y n>o/t", "absolutelynot"]
17 for [input, expected] <- examples do
18 assert Pleroma.User.Search.sanitise_domain(input) == expected