Some changes to the "site taken" copy (#2647)

* Some changes to the "site taken" copy

* Update site.ex

* Fix tests

---------

Co-authored-by: Vinicius Brasil <vini@hey.com>
pull/2652/head
Marko Saric 4 years ago committed by GitHub
parent 912c9374d4
commit 4ea519fd11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -50,7 +50,7 @@ defmodule Plausible.Site do
|> validate_domain_reserved_characters()
|> unique_constraint(:domain,
message:
"This domain has already been taken. Perhaps one of your team members registered it? If that's not the case, please contact support@plausible.io"
"This domain cannot be registered. Perhaps one of your colleagues registered it? Or did you recently delete it from your account? The deletion may take up to 48 hours before you can add the same site again. If that's not the case, please contact support@plausible.io"
)
end

@ -192,7 +192,7 @@ defmodule Plausible.Sites do
[
domain:
"This domain has already been taken. Perhaps one of your team members registered it? If that's not the case, please contact support@plausible.io"
"This domain cannot be registered. Perhaps one of your colleagues registered it? Or did you recently delete it from your account? The deletion may take up to 48 hours before you can add the same site again. If that's not the case, please contact support@plausible.io"
]
else
[]

@ -98,7 +98,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
assert json_response(conn, 400) == %{
"error" =>
"domain: This domain has already been taken. Perhaps one of your team members registered it? If that's not the case, please contact support@plausible.io"
"domain: This domain cannot be registered. Perhaps one of your colleagues registered it? Or did you recently delete it from your account? The deletion may take up to 48 hours before you can add the same site again. If that's not the case, please contact support@plausible.io"
}
end

@ -126,7 +126,7 @@ defmodule PlausibleWeb.SiteControllerTest do
})
assert html = html_response(conn, 200)
assert html =~ "This domain has already been taken."
assert html =~ "This domain cannot be registered"
assert html =~ "please contact support"
refute Repo.get_by(Plausible.Site, domain: domain)
end
@ -291,7 +291,7 @@ defmodule PlausibleWeb.SiteControllerTest do
})
assert html_response(conn, 200) =~
"This domain has already been taken. Perhaps one of your team members registered it? If that&#39;s not the case, please contact support@plausible.io"
"This domain cannot be registered. Perhaps one of your colleagues registered it?"
end
end

Loading…
Cancel
Save