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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
9a88e4d1
Commit
9a88e4d1
authored
Jan 05, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some tests. Use travis-ci 1.9.2
parent
e16cebac
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
36 deletions
+10
-36
.travis.yml
.travis.yml
+1
-1
spec/models/gitlab_ci_service_spec.rb
spec/models/gitlab_ci_service_spec.rb
+0
-4
spec/models/note_spec.rb
spec/models/note_spec.rb
+1
-1
spec/models/project_spec.rb
spec/models/project_spec.rb
+2
-24
spec/models/protected_branch_spec.rb
spec/models/protected_branch_spec.rb
+1
-1
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+1
-1
spec/requests/security/project_access_spec.rb
spec/requests/security/project_access_spec.rb
+4
-4
No files found.
.travis.yml
View file @
9a88e4d1
...
...
@@ -8,7 +8,7 @@ branches:
only
:
-
'
master'
rvm
:
-
1.9.
3
-
1.9.
2
services
:
-
mysql
-
postgresql
...
...
spec/models/gitlab_ci_service_spec.rb
View file @
9a88e4d1
...
...
@@ -35,10 +35,6 @@ describe GitlabCiService do
)
end
describe
:commit_badge_path
do
it
{
@service
.
commit_badge_path
(
"2ab7834c"
).
should
==
"http://ci.gitlab.org/projects/2/status?sha=2ab7834c"
}
end
describe
:commit_status_path
do
it
{
@service
.
commit_status_path
(
"2ab7834c"
).
should
==
"http://ci.gitlab.org/projects/2/builds/2ab7834c/status.json?token=verySecret"
}
end
...
...
spec/models/note_spec.rb
View file @
9a88e4d1
...
...
@@ -77,7 +77,7 @@ describe Note do
end
let
(
:project
)
{
create
(
:project
)
}
let
(
:commit
)
{
project
.
commit
}
let
(
:commit
)
{
project
.
repository
.
commit
}
describe
"Commit notes"
do
before
do
...
...
spec/models/project_spec.rb
View file @
9a88e4d1
...
...
@@ -97,11 +97,6 @@ describe Project do
project
.
url_to_repo
.
should
==
Gitlab
.
config
.
gitolite
.
ssh_path_prefix
+
"somewhere.git"
end
it
"should return path to repo"
do
project
=
Project
.
new
(
path:
"somewhere"
)
project
.
path_to_repo
.
should
==
Rails
.
root
.
join
(
"tmp"
,
"repositories"
,
"somewhere"
)
end
it
"returns the full web URL for this repo"
do
project
=
Project
.
new
(
path:
"somewhere"
)
project
.
web_url
.
should
==
"
#{
Gitlab
.
config
.
gitlab
.
url
}
/somewhere"
...
...
@@ -229,32 +224,15 @@ describe Project do
end
end
describe
"#empty_repo?"
do
describe
:repository
do
let
(
:project
)
{
create
(
:project
)
}
it
"should return true if the repo doesn't exist"
do
project
.
stub
(
repo_exists?:
false
,
has_commits?:
true
)
project
.
should
be_empty_repo
end
it
"should return true if the repo has commits"
do
project
.
stub
(
repo_exists?:
true
,
has_commits?:
false
)
project
.
should
be_empty_repo
end
it
"should return false if the repo exists and has commits"
do
project
.
stub
(
repo_exists?:
true
,
has_commits?:
true
)
project
.
should_not
be_empty_repo
end
end
describe
:repository
do
it
"should return valid repo"
do
project
.
repository
.
should
be_kind_of
(
Repository
)
end
it
"should return nil"
do
Project
.
new
(
path:
"
invalid
"
).
repository
.
should
be_nil
Project
.
new
(
path:
"
empty
"
).
repository
.
should
be_nil
end
end
end
spec/models/protected_branch_spec.rb
View file @
9a88e4d1
...
...
@@ -44,7 +44,7 @@ describe ProtectedBranch do
let
(
:branch
)
{
create
(
:protected_branch
)
}
it
'commits itself to its project'
do
branch
.
project
.
should_receive
(
:commit
).
with
(
branch
.
name
)
branch
.
project
.
repository
.
should_receive
(
:commit
).
with
(
branch
.
name
)
branch
.
commit
end
end
...
...
spec/models/repository_spec.rb
View file @
9a88e4d1
...
...
@@ -30,7 +30,7 @@ describe Repository do
end
it
"returns non-master when master exists but default branch is set to something else"
do
repository
.
default_branch
=
'stable'
repository
.
root_ref
=
'stable'
repository
.
should_receive
(
:branch_names
).
at_least
(
:once
).
and_return
([
stable
,
master
])
repository
.
discover_default_branch
.
should
==
'stable'
end
...
...
spec/requests/security/project_access_spec.rb
View file @
9a88e4d1
...
...
@@ -22,10 +22,10 @@ describe "Application access" do
before
do
# full access
project
.
users_projects
.
create
(
user:
master
,
project_access:
UsersProject
::
MASTER
)
project
.
team
<<
[
master
,
:master
]
# readonly
project
.
users_projects
.
create
(
user:
reporter
,
project_access:
UsersProject
::
REPORTER
)
project
.
team
<<
[
reporter
,
:reporter
]
end
describe
"GET /project_code"
do
...
...
@@ -62,7 +62,7 @@ describe "Application access" do
end
describe
"GET /project_code/commit/:sha"
do
subject
{
project_commit_path
(
project
,
project
.
commit
)
}
subject
{
project_commit_path
(
project
,
project
.
repository
.
commit
)
}
it
{
should
be_allowed_for
master
}
it
{
should
be_allowed_for
reporter
}
...
...
@@ -107,7 +107,7 @@ describe "Application access" do
describe
"GET /project_code/blob"
do
before
do
commit
=
project
.
commit
commit
=
project
.
repository
.
commit
path
=
commit
.
tree
.
contents
.
select
{
|
i
|
i
.
is_a?
(
Grit
::
Blob
)}.
first
.
name
@blob_path
=
project_blob_path
(
project
,
File
.
join
(
commit
.
id
,
path
))
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