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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
bf8013f1
Commit
bf8013f1
authored
Sep 10, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix most of project specs
parent
59c3a323
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
spec/factories/ci/runners.rb
spec/factories/ci/runners.rb
+2
-2
spec/models/ci/project_spec.rb
spec/models/ci/project_spec.rb
+8
-8
No files found.
spec/factories/ci/runners.rb
View file @
bf8013f1
...
...
@@ -27,11 +27,11 @@ FactoryGirl.define do
platform
"darwin"
factory
:shared_runner
do
factory
:
ci_
shared_runner
do
is_shared
true
end
factory
:specific_runner
do
factory
:
ci_
specific_runner
do
is_shared
false
end
end
...
...
spec/models/ci/project_spec.rb
View file @
bf8013f1
...
...
@@ -27,7 +27,7 @@
require
'spec_helper'
describe
Project
do
describe
Ci
::
Project
do
subject
{
FactoryGirl
.
build
:ci_project
}
it
{
is_expected
.
to
have_many
(
:commits
)
}
...
...
@@ -57,7 +57,7 @@ describe Project do
FactoryGirl
.
create
:ci_commit
,
committed_at:
1
.
hour
.
ago
,
project:
newest_project
FactoryGirl
.
create
:ci_commit
,
committed_at:
2
.
hour
.
ago
,
project:
oldest_project
expect
(
Project
.
ordered_by_last_commit_date
).
to
eq
([
newest_project
,
oldest_project
,
project_without_commits
])
expect
(
Ci
::
Project
.
ordered_by_last_commit_date
).
to
eq
([
newest_project
,
oldest_project
,
project_without_commits
])
end
end
...
...
@@ -71,7 +71,7 @@ describe Project do
end
it
{
expect
(
project
.
status
).
to
eq
(
'pending'
)
}
it
{
expect
(
project
.
last_commit
).
to
be_kind_of
(
Commit
)
}
it
{
expect
(
project
.
last_commit
).
to
be_kind_of
(
C
i
::
C
ommit
)
}
it
{
expect
(
project
.
human_status
).
to
eq
(
'pending'
)
}
end
end
...
...
@@ -125,17 +125,17 @@ describe Project do
describe
'Project.parse'
do
let
(
:project_dump
)
{
YAML
.
load
File
.
read
(
Rails
.
root
.
join
(
'spec/support/gitlab_stubs/raw_project.yml'
))
}
let
(
:parsed_project
)
{
Project
.
parse
(
project_dump
)
}
let
(
:parsed_project
)
{
Ci
::
Project
.
parse
(
project_dump
)
}
it
{
expect
(
parsed_project
).
to
be_valid
}
it
{
expect
(
parsed_project
).
to
be_kind_of
(
Project
)
}
it
{
expect
(
parsed_project
).
to
be_kind_of
(
Ci
::
Project
)
}
it
{
expect
(
parsed_project
.
name
).
to
eq
(
"GitLab / api.gitlab.org"
)
}
it
{
expect
(
parsed_project
.
gitlab_id
).
to
eq
(
189
)
}
it
{
expect
(
parsed_project
.
gitlab_url
).
to
eq
(
"http://demo.gitlab.com/gitlab/api-gitlab-org"
)
}
it
"parses plain hash"
do
expect
(
Project
.
parse
(
project_dump
).
name
).
to
eq
(
"GitLab / api.gitlab.org"
)
expect
(
Ci
::
Project
.
parse
(
project_dump
).
name
).
to
eq
(
"GitLab / api.gitlab.org"
)
end
end
...
...
@@ -154,8 +154,8 @@ describe Project do
describe
:search
do
let!
(
:project
)
{
FactoryGirl
.
create
(
:ci_project
,
name:
"foo"
)
}
it
{
expect
(
Project
.
search
(
'fo'
)).
to
include
(
project
)
}
it
{
expect
(
Project
.
search
(
'bar'
)).
to
be_empty
}
it
{
expect
(
Ci
::
Project
.
search
(
'fo'
)).
to
include
(
project
)
}
it
{
expect
(
Ci
::
Project
.
search
(
'bar'
)).
to
be_empty
}
end
describe
:any_runners
do
...
...
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