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
0f3deac3
Commit
0f3deac3
authored
Sep 28, 2015
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests
parent
0fa4ab5f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
8 deletions
+9
-8
features/steps/project/commits/commits.rb
features/steps/project/commits/commits.rb
+1
-1
features/steps/shared/project.rb
features/steps/shared/project.rb
+1
-1
spec/lib/ci/charts_spec.rb
spec/lib/ci/charts_spec.rb
+2
-3
spec/models/project_spec.rb
spec/models/project_spec.rb
+5
-3
No files found.
features/steps/project/commits/commits.rb
View file @
0f3deac3
...
@@ -104,7 +104,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
...
@@ -104,7 +104,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
step
'commit has ci status'
do
step
'commit has ci status'
do
@project
.
enable_ci
(
@user
)
@project
.
enable_ci
(
@user
)
create
:ci_commit
,
project:
@project
.
gitlab_ci_
project
,
sha:
sample_commit
.
id
create
:ci_commit
,
gl_project:
@
project
,
sha:
sample_commit
.
id
end
end
step
'I see commit ci info'
do
step
'I see commit ci info'
do
...
...
features/steps/shared/project.rb
View file @
0f3deac3
...
@@ -204,6 +204,6 @@ module SharedProject
...
@@ -204,6 +204,6 @@ module SharedProject
step
'project "Shop" has CI build'
do
step
'project "Shop" has CI build'
do
project
=
Project
.
find_by
(
name:
"Shop"
)
project
=
Project
.
find_by
(
name:
"Shop"
)
create
:ci_commit
,
project:
project
.
gitlab_ci_
project
,
sha:
project
.
commit
.
sha
create
:ci_commit
,
gl_project:
project
,
sha:
project
.
commit
.
sha
end
end
end
end
spec/lib/ci/charts_spec.rb
View file @
0f3deac3
...
@@ -4,13 +4,12 @@ describe "Charts" do
...
@@ -4,13 +4,12 @@ describe "Charts" do
context
"build_times"
do
context
"build_times"
do
before
do
before
do
@project
=
FactoryGirl
.
create
(
:ci_project
)
@commit
=
FactoryGirl
.
create
(
:ci_commit
)
@commit
=
FactoryGirl
.
create
(
:ci_commit
,
project:
@project
)
FactoryGirl
.
create
(
:ci_build
,
commit:
@commit
)
FactoryGirl
.
create
(
:ci_build
,
commit:
@commit
)
end
end
it
'should return build times in minutes'
do
it
'should return build times in minutes'
do
chart
=
Ci
::
Charts
::
BuildTime
.
new
(
@project
)
chart
=
Ci
::
Charts
::
BuildTime
.
new
(
@
commit
.
project
)
expect
(
chart
.
build_times
).
to
eq
([
2
])
expect
(
chart
.
build_times
).
to
eq
([
2
])
end
end
end
end
...
...
spec/models/project_spec.rb
View file @
0f3deac3
...
@@ -404,10 +404,12 @@ describe Project do
...
@@ -404,10 +404,12 @@ describe Project do
describe
:ci_commit
do
describe
:ci_commit
do
let
(
:project
)
{
create
:project
}
let
(
:project
)
{
create
:project
}
let
(
:ci_project
)
{
create
:ci_project
,
gl_project:
project
}
let
(
:commit
)
{
create
:ci_commit
,
gl_project:
project
}
let
(
:commit
)
{
create
:ci_commit
,
project:
ci_project
}
before
{
project
.
create_gitlab_ci_service
(
active:
true
)
}
before
do
project
.
ensure_ci_project
project
.
create_gitlab_ci_service
(
active:
true
)
end
it
{
expect
(
project
.
ci_commit
(
commit
.
sha
)).
to
eq
(
commit
)
}
it
{
expect
(
project
.
ci_commit
(
commit
.
sha
)).
to
eq
(
commit
)
}
end
end
...
...
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