From 64c3842e02e65bb173d275e4ac2cdbea5afcf562 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Wed, 15 Mar 2023 02:48:05 +0900 Subject: Hopefully improve accessibility --- spec/server.cr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'spec') diff --git a/spec/server.cr b/spec/server.cr index 69bb543..d24fe1d 100644 --- a/spec/server.cr +++ b/spec/server.cr @@ -110,13 +110,14 @@ describe Server do it "rejects too long nick" do msg = "Must be within #{MAX_NICK_LENGTH} characters" - expect_errors url, {"nick" => "x" * (MAX_NICK_LENGTH + 1)}, {"nick" => msg} + expect_errors url, {"nick" => "x" * (MAX_NICK_LENGTH + 1)}, + {"nick" => "Must match #{NICK_PATTERN}"} end it "rejects nicks that are not lowercase alphanumeric" do %w(camelCase pun/tu?a#tion).each do |nick| expect_errors url, {"nick" => nick}, - {"nick" => "Must be ASCII lowercase alphanumeric"} + {"nick" => "Must match #{NICK_PATTERN}"} end end -- cgit 1.4.1