Add specs for Milestone reference methods
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
9c6a532e7b
commit
6f4b48e288
1 changed files with 16 additions and 0 deletions
|
@ -519,4 +519,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
|
||||
|
|
Loading…
Reference in a new issue