From a1c01bc19bb48e921566304305ef3cfba02e671b Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Mon, 9 Feb 2015 00:01:31 +0100 Subject: Fix (project_)name_regex to accept non-ASCII letters and dash --- spec/lib/gitlab/regex_spec.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'spec/lib/gitlab/regex_spec.rb') diff --git a/spec/lib/gitlab/regex_spec.rb b/spec/lib/gitlab/regex_spec.rb index 727884c41c5..7fdc8fa600d 100644 --- a/spec/lib/gitlab/regex_spec.rb +++ b/spec/lib/gitlab/regex_spec.rb @@ -1,3 +1,4 @@ +# coding: utf-8 require 'spec_helper' describe Gitlab::Regex do @@ -16,6 +17,8 @@ describe Gitlab::Regex do it { expect('GitLab CE').to match(Gitlab::Regex.project_name_regex) } it { expect('100 lines').to match(Gitlab::Regex.project_name_regex) } it { expect('gitlab.git').to match(Gitlab::Regex.project_name_regex) } + it { expect('Český název').to match(Gitlab::Regex.project_name_regex) } + it { expect('Dash – is this').to match(Gitlab::Regex.project_name_regex) } it { expect('?gitlab').not_to match(Gitlab::Regex.project_name_regex) } end end -- cgit v1.2.3