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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
a14d6a9e
Commit
a14d6a9e
authored
Sep 20, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test for non-persisted merge request
parent
3ae99b2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+22
-0
No files found.
spec/models/merge_request_spec.rb
View file @
a14d6a9e
...
@@ -522,6 +522,28 @@ describe MergeRequest, models: true do
...
@@ -522,6 +522,28 @@ describe MergeRequest, models: true do
it_behaves_like
'returning pipelines with proper ordering'
it_behaves_like
'returning pipelines with proper ordering'
end
end
context
'with unsaved merge request'
do
let
(
:project
)
{
create
(
:project
)
}
subject
do
MergeRequest
.
new
(
source_project:
project
,
target_project:
project
,
source_branch:
'master'
,
target_branch:
'feature'
)
end
let!
(
:pipeline
)
do
create
(
:ci_empty_pipeline
,
project:
project
,
sha:
subject
.
diff_head_sha
,
ref:
subject
.
source_branch
)
end
it
'returns pipelines from diff_head_sha'
do
expect
(
subject
.
all_pipelines
).
to
contain_exactly
(
pipeline
)
end
end
end
end
describe
'#all_commits_sha'
do
describe
'#all_commits_sha'
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