Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6f4b48e2
Commit
6f4b48e2
authored
May 29, 2019
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs for Milestone reference methods
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
9c6a532e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
spec/models/milestone_spec.rb
spec/models/milestone_spec.rb
+16
-0
No files found.
spec/models/milestone_spec.rb
View file @
6f4b48e2
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment