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
bb74777f
Commit
bb74777f
authored
Sep 22, 2020
by
Peter Leitzen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Speed up merge request presenter specs
parent
6c530fec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
spec/presenters/merge_request_presenter_spec.rb
spec/presenters/merge_request_presenter_spec.rb
+11
-10
No files found.
spec/presenters/merge_request_presenter_spec.rb
View file @
bb74777f
...
...
@@ -3,9 +3,9 @@
require
'spec_helper'
RSpec
.
describe
MergeRequestPresenter
do
let
(
:resource
)
{
create
(
:merge_request
,
source_project:
project
)
}
let
(
:project
)
{
create
(
:
project
)
}
let
(
:user
)
{
create
(
:user
)
}
let
_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let
_it_be
(
:resource
)
{
create
(
:merge_request
,
source_project:
project
)
}
let
_it_be
(
:user
)
{
create
(
:user
)
}
describe
'#ci_status'
do
subject
{
described_class
.
new
(
resource
).
ci_status
}
...
...
@@ -73,8 +73,6 @@ RSpec.describe MergeRequestPresenter do
end
describe
'#conflict_resolution_path'
do
let
(
:project
)
{
create
:project
}
let
(
:user
)
{
create
:user
}
let
(
:presenter
)
{
described_class
.
new
(
resource
,
current_user:
user
)
}
let
(
:path
)
{
presenter
.
conflict_resolution_path
}
...
...
@@ -107,18 +105,21 @@ RSpec.describe MergeRequestPresenter do
end
context
'issues links'
do
let
(
:project
)
{
create
(
:project
,
:private
,
:repository
,
creator:
user
,
namespace:
user
.
namespace
)
}
let
(
:issue_a
)
{
create
(
:issue
,
project:
project
)
}
let
(
:issue_b
)
{
create
(
:issue
,
project:
project
)
}
let
_it_be
(
:project
)
{
create
(
:project
,
:private
,
:repository
,
creator:
user
,
namespace:
user
.
namespace
)
}
let
_it_be
(
:issue_a
)
{
create
(
:issue
,
project:
project
)
}
let
_it_be
(
:issue_b
)
{
create
(
:issue
,
project:
project
)
}
let
(
:resource
)
do
let
_it_be
(
:resource
)
do
create
(
:merge_request
,
source_project:
project
,
target_project:
project
,
description:
"Fixes
#{
issue_a
.
to_reference
}
Related
#{
issue_b
.
to_reference
}
"
)
end
before
do
before
_all
do
project
.
add_developer
(
user
)
end
before
do
allow
(
resource
.
project
).
to
receive
(
:default_branch
)
.
and_return
(
resource
.
target_branch
)
resource
.
cache_merge_request_closes_issues!
...
...
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