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
4289c817
Commit
4289c817
authored
Feb 14, 2019
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract EE-specific code from spec/factories/merge_requests.rb
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
06165c47
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
ee/spec/factories/merge_requests.rb
ee/spec/factories/merge_requests.rb
+13
-0
spec/factories/merge_requests.rb
spec/factories/merge_requests.rb
+0
-7
No files found.
ee/spec/factories/merge_requests.rb
View file @
4289c817
# frozen_string_literal: true
FactoryBot
.
modify
do
factory
:merge_request
do
trait
:with_approver
do
after
:create
do
|
merge_request
|
create
:approver
,
target:
merge_request
end
end
end
end
FactoryBot
.
define
do
factory
:merge_request_with_approver
,
parent: :merge_request
,
traits:
[
:with_approver
]
factory
:ee_merge_request
,
parent: :merge_request
do
trait
:with_license_management_reports
do
after
(
:build
)
do
|
merge_request
|
...
...
spec/factories/merge_requests.rb
View file @
4289c817
...
...
@@ -68,12 +68,6 @@ FactoryBot.define do
target_branch
"master"
end
trait
:with_approver
do
after
:create
do
|
merge_request
|
create
:approver
,
target:
merge_request
end
end
trait
:rebased
do
source_branch
"markdown"
target_branch
"improve/awesome"
...
...
@@ -141,7 +135,6 @@ FactoryBot.define do
factory
:reopened_merge_request
,
traits:
[
:opened
]
factory
:invalid_merge_request
,
traits:
[
:invalid
]
factory
:merge_request_with_diffs
,
traits:
[
:with_diffs
]
factory
:merge_request_with_approver
,
traits:
[
:with_approver
]
factory
:merge_request_with_diff_notes
do
after
(
:create
)
do
|
mr
|
create
(
:diff_note_on_merge_request
,
noteable:
mr
,
project:
mr
.
source_project
)
...
...
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