diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2019-05-31 18:53:04 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2019-05-31 18:53:04 +0300 |
commit | d7b277df46ffa3723a16159878958f9a825315e6 (patch) | |
tree | 89dac0eeecb620386d36c71fca7d9e4ea33ae3da /spec/models/milestone_spec.rb | |
parent | 5cd0e721f78310bc2bb810d17451f046270148d9 (diff) | |
parent | bd4a3b6ebfbca9663f47940ea01b8304d68e4e38 (diff) |
Merge branch 'dz-scope-project-routes-3' into 'master'
Move some project routes under - scope
See merge request gitlab-org/gitlab-ce!28830
Diffstat (limited to 'spec/models/milestone_spec.rb')
-rw-r--r-- | spec/models/milestone_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/models/milestone_spec.rb b/spec/models/milestone_spec.rb index 752a7965704..0fa4e470eef 100644 --- a/spec/models/milestone_spec.rb +++ b/spec/models/milestone_spec.rb @@ -520,4 +520,20 @@ describe Milestone do end end end + + describe '.reference_pattern' do + subject { described_class.reference_pattern } + + it { is_expected.to match('gitlab-org/gitlab-ce%123') } + it { is_expected.to match('gitlab-org/gitlab-ce%"my-milestone"') } + end + + describe '.link_reference_pattern' do + subject { described_class.link_reference_pattern } + + it { is_expected.to match("#{Gitlab.config.gitlab.url}/gitlab-org/gitlab-ce/milestones/123") } + it { is_expected.to match("#{Gitlab.config.gitlab.url}/gitlab-org/gitlab-ce/-/milestones/123") } + it { is_expected.not_to match("#{Gitlab.config.gitlab.url}/gitlab-org/gitlab-ce/issues/123") } + it { is_expected.not_to match("gitlab-org/gitlab-ce/milestones/123") } + end end |