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
3669c48d
Commit
3669c48d
authored
Oct 04, 2020
by
Peter Leitzen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Speed up closing issue extractor lib specs
parent
900b25a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
spec/lib/gitlab/closing_issue_extractor_spec.rb
spec/lib/gitlab/closing_issue_extractor_spec.rb
+10
-9
No files found.
spec/lib/gitlab/closing_issue_extractor_spec.rb
View file @
3669c48d
...
@@ -3,18 +3,16 @@
...
@@ -3,18 +3,16 @@
require
'spec_helper'
require
'spec_helper'
RSpec
.
describe
Gitlab
::
ClosingIssueExtractor
do
RSpec
.
describe
Gitlab
::
ClosingIssueExtractor
do
let
(
:project
)
{
create
(
:project
)
}
let_it_be_with_reload
(
:project
)
{
create
(
:project
)
}
let
(
:project2
)
{
create
(
:project
)
}
let_it_be
(
:project2
)
{
create
(
:project
)
}
let
(
:forked_project
)
{
Projects
::
ForkService
.
new
(
project
,
project2
.
creator
).
execute
}
let_it_be
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let_it_be
(
:issue2
)
{
create
(
:issue
,
project:
project2
)
}
let
(
:issue2
)
{
create
(
:issue
,
project:
project2
)
}
let
(
:reference
)
{
issue
.
to_reference
}
let
(
:reference
)
{
issue
.
to_reference
}
let
(
:cross_reference
)
{
issue2
.
to_reference
(
project
)
}
let
(
:cross_reference
)
{
issue2
.
to_reference
(
project
)
}
let
(
:fork_cross_reference
)
{
issue
.
to_reference
(
forked_project
)
}
subject
{
described_class
.
new
(
project
,
project
.
creator
)
}
subject
{
described_class
.
new
(
project
,
project
.
creator
)
}
before
do
before
_all
do
project
.
add_developer
(
project
.
creator
)
project
.
add_developer
(
project
.
creator
)
project
.
add_developer
(
project2
.
creator
)
project
.
add_developer
(
project2
.
creator
)
project2
.
add_maintainer
(
project
.
creator
)
project2
.
add_maintainer
(
project
.
creator
)
...
@@ -325,6 +323,9 @@ RSpec.describe Gitlab::ClosingIssueExtractor do
...
@@ -325,6 +323,9 @@ RSpec.describe Gitlab::ClosingIssueExtractor do
end
end
context
"with a cross-project fork reference"
do
context
"with a cross-project fork reference"
do
let
(
:forked_project
)
{
Projects
::
ForkService
.
new
(
project
,
project2
.
creator
).
execute
}
let
(
:fork_cross_reference
)
{
issue
.
to_reference
(
forked_project
)
}
subject
{
described_class
.
new
(
forked_project
,
forked_project
.
creator
)
}
subject
{
described_class
.
new
(
forked_project
,
forked_project
.
creator
)
}
it
do
it
do
...
@@ -348,8 +349,8 @@ RSpec.describe Gitlab::ClosingIssueExtractor do
...
@@ -348,8 +349,8 @@ RSpec.describe Gitlab::ClosingIssueExtractor do
end
end
context
'with multiple references'
do
context
'with multiple references'
do
let
(
:other_issue
)
{
create
(
:issue
,
project:
project
)
}
let
_it_be
(
:other_issue
)
{
create
(
:issue
,
project:
project
)
}
let
(
:third_issue
)
{
create
(
:issue
,
project:
project
)
}
let
_it_be
(
:third_issue
)
{
create
(
:issue
,
project:
project
)
}
let
(
:reference2
)
{
other_issue
.
to_reference
}
let
(
:reference2
)
{
other_issue
.
to_reference
}
let
(
:reference3
)
{
third_issue
.
to_reference
}
let
(
:reference3
)
{
third_issue
.
to_reference
}
...
...
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