diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2017-02-13 13:26:33 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2017-02-13 22:30:10 +0200 |
commit | 2c55fd0019ea9ac33e310151a61892fada42d5a2 (patch) | |
tree | a658277ef7bea4390d8856755251be72b53b697f /spec/lib/gitlab/regex_spec.rb | |
parent | e5f446b7ca4bc54ffaf527e4c57dea2bee2f79f6 (diff) | |
download | gitlab-ce-2c55fd0019ea9ac33e310151a61892fada42d5a2.tar.gz |
Add GFM support to nested groupsdz-nested-groups-gfm-alt
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/lib/gitlab/regex_spec.rb')
-rw-r--r-- | spec/lib/gitlab/regex_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/lib/gitlab/regex_spec.rb b/spec/lib/gitlab/regex_spec.rb index 1dbc2f6eb13..089ec4e2737 100644 --- a/spec/lib/gitlab/regex_spec.rb +++ b/spec/lib/gitlab/regex_spec.rb @@ -50,4 +50,16 @@ describe Gitlab::Regex, lib: true do it { is_expected.not_to match('9foo') } it { is_expected.not_to match('foo-') } end + + describe 'NAMESPACE_REF_REGEX_STR' do + subject { %r{\A#{Gitlab::Regex::NAMESPACE_REF_REGEX_STR}\z} } + + it { is_expected.to match('gitlab.org') } + it { is_expected.to match('gitlab.org/gitlab-git') } + it { is_expected.not_to match('gitlab.org.') } + it { is_expected.not_to match('gitlab.org/') } + it { is_expected.not_to match('/gitlab.org') } + it { is_expected.not_to match('gitlab.git') } + it { is_expected.not_to match('gitlab git') } + end end |