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
01f37eb7
Commit
01f37eb7
authored
Sep 05, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimize CI/CD build model specs
parent
d2e02224
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
spec/models/ci/build_spec.rb
spec/models/ci/build_spec.rb
+5
-8
No files found.
spec/models/ci/build_spec.rb
View file @
01f37eb7
require
'spec_helper'
require
'spec_helper'
describe
Ci
::
Build
do
describe
Ci
::
Build
do
let
(
:user
)
{
create
(
:user
)
}
set
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
set
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
)
}
let
(
:test_trace
)
{
'This is a test'
}
l
et
(
:pipeline
)
do
s
et
(
:pipeline
)
do
create
(
:ci_pipeline
,
project:
project
,
create
(
:ci_pipeline
,
project:
project
,
sha:
project
.
commit
.
id
,
sha:
project
.
commit
.
id
,
ref:
project
.
default_branch
,
ref:
project
.
default_branch
,
status:
'success'
)
status:
'success'
)
end
end
let
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
)
}
it
{
is_expected
.
to
belong_to
(
:runner
)
}
it
{
is_expected
.
to
belong_to
(
:runner
)
}
it
{
is_expected
.
to
belong_to
(
:trigger_request
)
}
it
{
is_expected
.
to
belong_to
(
:trigger_request
)
}
it
{
is_expected
.
to
belong_to
(
:erased_by
)
}
it
{
is_expected
.
to
belong_to
(
:erased_by
)
}
...
@@ -1096,9 +1096,6 @@ describe Ci::Build do
...
@@ -1096,9 +1096,6 @@ describe Ci::Build do
end
end
describe
'#repo_url'
do
describe
'#repo_url'
do
let
(
:build
)
{
create
(
:ci_build
)
}
let
(
:project
)
{
build
.
project
}
subject
{
build
.
repo_url
}
subject
{
build
.
repo_url
}
it
{
is_expected
.
to
be_a
(
String
)
}
it
{
is_expected
.
to
be_a
(
String
)
}
...
...
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