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
d9e1d0cb
Commit
d9e1d0cb
authored
Jun 17, 2021
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Alias shared example block during rename
parent
ae766b0d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
spec/support/shared_examples/models/issue_tracker_service_shared_examples.rb
..._examples/models/issue_tracker_service_shared_examples.rb
+7
-1
No files found.
spec/support/shared_examples/models/issue_tracker_service_shared_examples.rb
View file @
d9e1d0cb
# frozen_string_literal: true
RSpec
.
shared_examples
'issue tracker
service
URL attribute'
do
|
url_attr
|
RSpec
.
shared_examples
'issue tracker
integration
URL attribute'
do
|
url_attr
|
it
{
is_expected
.
to
allow_value
(
'https://example.com'
).
for
(
url_attr
)
}
it
{
is_expected
.
not_to
allow_value
(
'example.com'
).
for
(
url_attr
)
}
...
...
@@ -8,6 +8,12 @@ RSpec.shared_examples 'issue tracker service URL attribute' do |url_attr|
it
{
is_expected
.
not_to
allow_value
(
'herp-and-derp'
).
for
(
url_attr
)
}
end
# TODO: clean up:
# remove when https://gitlab.com/gitlab-org/gitlab/-/issues/330300 has been completed
RSpec
.
shared_examples
'issue tracker service URL attribute'
do
|
url_attr
|
it_behaves_like
'issue tracker integration URL attribute'
,
url_attr
end
RSpec
.
shared_examples
'allows project key on reference pattern'
do
|
url_attr
|
it
'allows underscores in the project name'
do
expect
(
described_class
.
reference_pattern
.
match
(
'EXT_EXT-1234'
)[
0
]).
to
eq
'EXT_EXT-1234'
...
...
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