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
Jérome Perrin
gitlab-ce
Commits
1bed2c87
Commit
1bed2c87
authored
Apr 06, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing tests and update test description
parent
38c324b9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
1 deletion
+3
-1
spec/models/ci/pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+1
-0
spec/models/commit_status_spec.rb
spec/models/commit_status_spec.rb
+1
-0
spec/presenters/ci/build_presenter_spec.rb
spec/presenters/ci/build_presenter_spec.rb
+1
-1
No files found.
spec/models/ci/pipeline_spec.rb
View file @
1bed2c87
...
@@ -18,6 +18,7 @@ describe Ci::Pipeline, models: true do
...
@@ -18,6 +18,7 @@ describe Ci::Pipeline, models: true do
it
{
is_expected
.
to
have_many
(
:trigger_requests
)
}
it
{
is_expected
.
to
have_many
(
:trigger_requests
)
}
it
{
is_expected
.
to
have_many
(
:builds
)
}
it
{
is_expected
.
to
have_many
(
:builds
)
}
it
{
is_expected
.
to
have_many
(
:auto_canceled_pipelines
)
}
it
{
is_expected
.
to
have_many
(
:auto_canceled_pipelines
)
}
it
{
is_expected
.
to
have_many
(
:auto_canceled_jobs
)
}
it
{
is_expected
.
to
validate_presence_of
:sha
}
it
{
is_expected
.
to
validate_presence_of
:sha
}
it
{
is_expected
.
to
validate_presence_of
:status
}
it
{
is_expected
.
to
validate_presence_of
:status
}
...
...
spec/models/commit_status_spec.rb
View file @
1bed2c87
...
@@ -16,6 +16,7 @@ describe CommitStatus, :models do
...
@@ -16,6 +16,7 @@ describe CommitStatus, :models do
it
{
is_expected
.
to
belong_to
(
:pipeline
)
}
it
{
is_expected
.
to
belong_to
(
:pipeline
)
}
it
{
is_expected
.
to
belong_to
(
:user
)
}
it
{
is_expected
.
to
belong_to
(
:user
)
}
it
{
is_expected
.
to
belong_to
(
:project
)
}
it
{
is_expected
.
to
belong_to
(
:project
)
}
it
{
is_expected
.
to
belong_to
(
:auto_canceled_by
)
}
it
{
is_expected
.
to
validate_presence_of
(
:name
)
}
it
{
is_expected
.
to
validate_presence_of
(
:name
)
}
it
{
is_expected
.
to
validate_inclusion_of
(
:status
).
in_array
(
%w(pending running failed success canceled)
)
}
it
{
is_expected
.
to
validate_inclusion_of
(
:status
).
in_array
(
%w(pending running failed success canceled)
)
}
...
...
spec/presenters/ci/build_presenter_spec.rb
View file @
1bed2c87
...
@@ -64,7 +64,7 @@ describe Ci::BuildPresenter do
...
@@ -64,7 +64,7 @@ describe Ci::BuildPresenter do
expect
(
build
).
to
receive
(
:auto_canceled_by_id
).
and_return
(
1
)
expect
(
build
).
to
receive
(
:auto_canceled_by_id
).
and_return
(
1
)
end
end
it
'shows that the
job
is auto-canceled'
do
it
'shows that the
build
is auto-canceled'
do
status_title
=
presenter
.
status_title
status_title
=
presenter
.
status_title
expect
(
status_title
).
to
include
(
'auto-canceled'
)
expect
(
status_title
).
to
include
(
'auto-canceled'
)
...
...
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