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
Boxiang Sun
gitlab-ce
Commits
dc6afd57
Commit
dc6afd57
authored
Jul 20, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Just use default_branch, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13176885
parent
09114211
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
spec/models/build_spec.rb
spec/models/build_spec.rb
+4
-4
spec/requests/api/builds_spec.rb
spec/requests/api/builds_spec.rb
+2
-2
No files found.
spec/models/build_spec.rb
View file @
dc6afd57
...
...
@@ -6,7 +6,7 @@ describe Ci::Build, models: true do
let
(
:pipeline
)
do
create
(
:ci_pipeline
,
project:
project
,
sha:
project
.
commit
.
id
,
ref:
'fix'
,
ref:
project
.
default_branch
,
status:
'success'
)
end
...
...
@@ -680,8 +680,8 @@ describe Ci::Build, models: true do
end
context
'with succeed pipeline'
do
it
'returns builds for ref'
do
builds
=
project
.
latest_successful_builds_for
(
'fix'
)
it
'returns builds for ref
for default_branch
'
do
builds
=
project
.
latest_successful_builds_for
expect
(
builds
).
to
contain_exactly
(
build
)
end
...
...
@@ -700,7 +700,7 @@ describe Ci::Build, models: true do
end
it
'returns empty relation'
do
builds
=
project
.
latest_successful_builds_for
(
'fix'
)
builds
=
project
.
latest_successful_builds_for
expect
(
builds
).
to
be_kind_of
(
ActiveRecord
::
Relation
)
expect
(
builds
).
to
be_empty
...
...
spec/requests/api/builds_spec.rb
View file @
dc6afd57
...
...
@@ -192,8 +192,8 @@ describe API::API, api: true do
let
(
:pipeline
)
do
create
(
:ci_pipeline
,
project:
project
,
sha:
project
.
commit
(
'fix'
)
.
sha
,
ref:
'fix'
)
sha:
project
.
commit
.
sha
,
ref:
project
.
default_branch
)
end
let
(
:build
)
{
create
(
:ci_build
,
:success
,
:artifacts
,
pipeline:
pipeline
)
}
...
...
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