BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
53fe06ef
Commit
53fe06ef
authored
Jun 02, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update ci commit pipeline specs according to changes
parent
0d19abf4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
commit_spec.rb
spec/models/ci/commit_spec.rb
+8
-8
create_commit_builds_service_spec.rb
spec/services/create_commit_builds_service_spec.rb
+1
-1
No files found.
spec/models/ci/commit_spec.rb
View file @
53fe06ef
...
...
@@ -346,9 +346,9 @@ describe Ci::Commit, models: true do
end
end
describe
'#update_state'
do
it
'execute update_state after touching object'
do
expect
(
commit
).
to
receive
(
:update_state
).
and_return
(
true
)
describe
'#update_state
!
'
do
it
'execute update_state
!
after touching object'
do
expect
(
commit
).
to
receive
(
:update_state
!
).
and_return
(
true
)
commit
.
touch
end
...
...
@@ -356,17 +356,17 @@ describe Ci::Commit, models: true do
let
(
:commit_status
)
{
build
:commit_status
,
commit:
commit
}
it
'execute update_state after saving dependent object'
do
expect
(
commit
).
to
receive
(
:update_state
).
and_return
(
true
)
expect
(
commit
).
to
receive
(
:update_state
!
).
and_return
(
true
)
commit_status
.
save
end
end
context
'update state'
do
let
(
:current
)
{
Time
.
now
.
change
(
usec:
0
)
}
let
(
:build
)
{
FactoryGirl
.
create
:ci_build
,
:success
,
commit:
commit
,
started_at:
current
-
120
,
finished_at:
current
-
60
}
before
do
build
let
!
(
:build
)
do
create
:ci_build
,
:success
,
commit:
commit
,
started_at:
current
-
120
,
finished_at:
current
-
60
end
[
:status
,
:started_at
,
:finished_at
,
:duration
].
each
do
|
param
|
...
...
spec/services/create_commit_builds_service_spec.rb
View file @
53fe06ef
...
...
@@ -183,7 +183,7 @@ describe CreateCommitBuildsService, services: true do
ref:
'refs/heads/master'
,
before:
'00000000'
,
after:
'31das312'
,
commits:
[{
message:
'some msg'
}
])
commits:
[{
message:
'some msg'
}
])
expect
(
result
).
to
be
false
expect
(
Ci
::
Build
.
all
).
to
be_empty
...
...
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