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
131e212a
Commit
131e212a
authored
Mar 21, 2019
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move EE lines in ReferenceExtractor spec to ee/
parent
c6de49fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
17 deletions
+32
-17
ee/spec/lib/gitlab/reference_extractor_spec.rb
ee/spec/lib/gitlab/reference_extractor_spec.rb
+28
-0
spec/lib/gitlab/reference_extractor_spec.rb
spec/lib/gitlab/reference_extractor_spec.rb
+4
-17
No files found.
ee/spec/lib/gitlab/reference_extractor_spec.rb
0 → 100644
View file @
131e212a
# frozen_string_literal: true
require
'spec_helper'
describe
Gitlab
::
ReferenceExtractor
do
let
(
:group
)
{
create
(
:group
)
}
let
(
:project
)
{
create
(
:project
,
group:
group
)
}
before
do
group
.
add_developer
(
project
.
creator
)
end
subject
{
described_class
.
new
(
project
,
project
.
creator
)
}
it
'accesses valid epics'
do
stub_licensed_features
(
epics:
true
)
@e0
=
create
(
:epic
,
group:
group
)
@e1
=
create
(
:epic
,
group:
group
)
@e2
=
create
(
:epic
,
group:
create
(
:group
,
:private
))
text
=
"
#{
@e0
.
to_reference
(
group
,
full:
true
)
}
, &999,
#{
@e1
.
to_reference
(
group
,
full:
true
)
}
,
#{
@e2
.
to_reference
(
group
,
full:
true
)
}
"
subject
.
analyze
(
text
,
{
group:
group
})
expect
(
subject
.
epics
).
to
match_array
([
@e0
,
@e1
])
end
end
spec/lib/gitlab/reference_extractor_spec.rb
View file @
131e212a
# frozen_string_literal: true
require
'spec_helper'
describe
Gitlab
::
ReferenceExtractor
do
let
(
:group
)
{
create
(
:group
)
}
let
(
:project
)
{
create
(
:project
,
group:
group
)
}
let
(
:project
)
{
create
(
:project
)
}
before
do
group
.
add_developer
(
project
.
creator
)
project
.
add_developer
(
project
.
creator
)
end
subject
{
described_class
.
new
(
project
,
project
.
creator
)
}
...
...
@@ -163,20 +164,6 @@ describe Gitlab::ReferenceExtractor do
expect
(
subject
.
snippets
).
to
match_array
([
@s0
,
@s1
])
end
it
'accesses valid epics'
do
stub_licensed_features
(
epics:
true
)
@e0
=
create
(
:epic
,
group:
group
)
@e1
=
create
(
:epic
,
group:
group
)
@e2
=
create
(
:epic
,
group:
create
(
:group
,
:private
))
text
=
"
#{
@e0
.
to_reference
(
group
,
full:
true
)
}
, &999,
#{
@e1
.
to_reference
(
group
,
full:
true
)
}
,
#{
@e2
.
to_reference
(
group
,
full:
true
)
}
"
subject
.
analyze
(
text
,
{
group:
group
})
expect
(
subject
.
epics
).
to
match_array
([
@e0
,
@e1
])
end
it
'accesses valid commits'
do
project
=
create
(
:project
,
:repository
)
{
|
p
|
p
.
add_developer
(
p
.
creator
)
}
commit
=
project
.
commit
(
'master'
)
...
...
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