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
329d3e12
Commit
329d3e12
authored
Mar 14, 2019
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove factories from AddHeadPipelineForEachMergeRequest spec
parent
2d383bd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
spec/migrations/add_head_pipeline_for_each_merge_request_spec.rb
...grations/add_head_pipeline_for_each_merge_request_spec.rb
+11
-13
No files found.
spec/migrations/add_head_pipeline_for_each_merge_request_spec.rb
View file @
329d3e12
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20170508170547_add_head_pipeline_for_each_merge_request.rb'
)
describe
AddHeadPipelineForEachMergeRequest
,
:delete
do
include
ProjectForksHelper
describe
AddHeadPipelineForEachMergeRequest
,
:migration
do
let
(
:migration
)
{
described_class
.
new
}
let!
(
:project
)
{
create
(
:project
)
}
# rubocop:disable RSpec/FactoriesInMigrationSpecs
let!
(
:other_project
)
{
fork_project
(
project
)
}
let!
(
:project
)
{
table
(
:projects
).
create!
}
let!
(
:other_project
)
{
table
(
:projects
).
create!
}
let!
(
:pipeline_1
)
{
create
(
:ci_pipeline
,
project:
project
,
ref:
"branch_1"
)
}
# rubocop:disable RSpec/FactoriesInMigrationSpecs
let!
(
:pipeline_2
)
{
create
(
:ci_pipeline
,
project:
other_project
,
ref:
"branch_1"
)
}
# rubocop:disable RSpec/FactoriesInMigrationSpecs
let!
(
:pipeline_3
)
{
create
(
:ci_pipeline
,
project:
other_project
,
ref:
"branch_1"
)
}
# rubocop:disable RSpec/FactoriesInMigrationSpecs
let!
(
:pipeline_4
)
{
create
(
:ci_pipeline
,
project:
project
,
ref:
"branch_2"
)
}
# rubocop:disable RSpec/FactoriesInMigrationSpecs
let!
(
:pipeline_1
)
{
table
(
:ci_pipelines
).
create!
(
project_id:
project
.
id
,
ref:
"branch_1"
)
}
let!
(
:pipeline_2
)
{
table
(
:ci_pipelines
).
create!
(
project_id:
other_project
.
id
,
ref:
"branch_1"
)
}
let!
(
:pipeline_3
)
{
table
(
:ci_pipelines
).
create!
(
project_id:
other_project
.
id
,
ref:
"branch_1"
)
}
let!
(
:pipeline_4
)
{
table
(
:ci_pipelines
).
create!
(
project_id:
project
.
id
,
ref:
"branch_2"
)
}
let!
(
:mr_1
)
{
create
(
:merge_request
,
source_project:
project
,
target_project:
project
,
source_branch:
"branch_1"
,
target_branch:
"target_1"
)
}
# rubocop:disable RSpec/FactoriesInMigrationSpecs
let!
(
:mr_2
)
{
create
(
:merge_request
,
source_project:
other_project
,
target_project:
project
,
source_branch:
"branch_1"
,
target_branch:
"target_2"
)
}
# rubocop:disable RSpec/FactoriesInMigrationSpecs
let!
(
:mr_3
)
{
create
(
:merge_request
,
source_project:
project
,
target_project:
project
,
source_branch:
"branch_2"
,
target_branch:
"master"
)
}
# rubocop:disable RSpec/FactoriesInMigrationSpecs
let!
(
:mr_4
)
{
create
(
:merge_request
,
source_project:
project
,
target_project:
project
,
source_branch:
"branch_3"
,
target_branch:
"master"
)
}
# rubocop:disable RSpec/FactoriesInMigrationSpecs
let!
(
:mr_1
)
{
table
(
:merge_requests
).
create!
(
source_project_id:
project
.
id
,
target_project_id:
project
.
id
,
source_branch:
"branch_1"
,
target_branch:
"target_1"
)
}
let!
(
:mr_2
)
{
table
(
:merge_requests
).
create!
(
source_project_id:
other_project
.
id
,
target_project_id:
project
.
id
,
source_branch:
"branch_1"
,
target_branch:
"target_2"
)
}
let!
(
:mr_3
)
{
table
(
:merge_requests
).
create!
(
source_project_id:
project
.
id
,
target_project_id:
project
.
id
,
source_branch:
"branch_2"
,
target_branch:
"master"
)
}
let!
(
:mr_4
)
{
table
(
:merge_requests
).
create!
(
source_project_id:
project
.
id
,
target_project_id:
project
.
id
,
source_branch:
"branch_3"
,
target_branch:
"master"
)
}
context
"#up"
do
context
"when source_project and source_branch of pipeline are the same of merge request"
do
...
...
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