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
ab0cfc00
Commit
ab0cfc00
authored
Feb 11, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing tests after refactoring
parent
2a1fac9e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
12 deletions
+7
-12
spec/lib/project_mover_spec.rb
spec/lib/project_mover_spec.rb
+1
-1
spec/lib/shell_spec.rb
spec/lib/shell_spec.rb
+2
-2
spec/models/project_spec.rb
spec/models/project_spec.rb
+1
-6
spec/observers/key_observer_spec.rb
spec/observers/key_observer_spec.rb
+2
-2
spec/workers/post_receive_spec.rb
spec/workers/post_receive_spec.rb
+1
-1
No files found.
spec/lib/project_mover_spec.rb
View file @
ab0cfc00
...
@@ -7,7 +7,7 @@ describe Gitlab::ProjectMover do
...
@@ -7,7 +7,7 @@ describe Gitlab::ProjectMover do
FileUtils
.
rm_rf
base_path
if
File
.
exists?
base_path
FileUtils
.
rm_rf
base_path
if
File
.
exists?
base_path
FileUtils
.
mkdir_p
base_path
FileUtils
.
mkdir_p
base_path
Gitlab
.
config
.
git
olite
.
stub
(
repos_path:
base_path
)
Gitlab
.
config
.
git
lab_shell
.
stub
(
repos_path:
base_path
)
@project
=
create
(
:project
)
@project
=
create
(
:project
)
end
end
...
...
spec/lib/shell_spec.rb
View file @
ab0cfc00
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
describe
Gitlab
::
Shell
do
describe
Gitlab
::
Shell
do
let
(
:project
)
{
double
(
'Project'
,
id:
7
,
path:
'diaspora'
)
}
let
(
:project
)
{
double
(
'Project'
,
id:
7
,
path:
'diaspora'
)
}
let
(
:git
olite
)
{
Gitlab
::
Shell
.
new
}
let
(
:git
lab_shell
)
{
Gitlab
::
Shell
.
new
}
before
do
before
do
Project
.
stub
(
find:
project
)
Project
.
stub
(
find:
project
)
...
@@ -13,5 +13,5 @@ describe Gitlab::Shell do
...
@@ -13,5 +13,5 @@ describe Gitlab::Shell do
it
{
should
respond_to
:add_repository
}
it
{
should
respond_to
:add_repository
}
it
{
should
respond_to
:remove_repository
}
it
{
should
respond_to
:remove_repository
}
it
{
git
olite
.
url_to_repo
(
'diaspora'
).
should
==
Gitlab
.
config
.
gitolite
.
ssh_path_prefix
+
"diaspora.git"
}
it
{
git
lab_shell
.
url_to_repo
(
'diaspora'
).
should
==
Gitlab
.
config
.
gitlab_shell
.
ssh_path_prefix
+
"diaspora.git"
}
end
end
spec/models/project_spec.rb
View file @
ab0cfc00
...
@@ -66,11 +66,6 @@ describe Project do
...
@@ -66,11 +66,6 @@ describe Project do
project
.
should_not
be_valid
project
.
should_not
be_valid
project
.
errors
[
:base
].
first
.
should
match
(
/Your own projects limit is 1/
)
project
.
errors
[
:base
].
first
.
should
match
(
/Your own projects limit is 1/
)
end
end
it
"should not allow 'gitolite-admin' as repo name"
do
should
allow_value
(
"blah"
).
for
(
:path
)
should_not
allow_value
(
"gitolite-admin"
).
for
(
:path
)
end
end
end
describe
"Respond to"
do
describe
"Respond to"
do
...
@@ -91,7 +86,7 @@ describe Project do
...
@@ -91,7 +86,7 @@ describe Project do
it
"should return valid url to repo"
do
it
"should return valid url to repo"
do
project
=
Project
.
new
(
path:
"somewhere"
)
project
=
Project
.
new
(
path:
"somewhere"
)
project
.
url_to_repo
.
should
==
Gitlab
.
config
.
git
olite
.
ssh_path_prefix
+
"somewhere.git"
project
.
url_to_repo
.
should
==
Gitlab
.
config
.
git
lab_shell
.
ssh_path_prefix
+
"somewhere.git"
end
end
it
"returns the full web URL for this repo"
do
it
"returns the full web URL for this repo"
do
...
...
spec/observers/key_observer_spec.rb
View file @
ab0cfc00
...
@@ -14,14 +14,14 @@ describe KeyObserver do
...
@@ -14,14 +14,14 @@ describe KeyObserver do
context
:after_save
do
context
:after_save
do
it
do
it
do
Git
olite
Worker
.
should_receive
(
:perform_async
).
with
(
:add_key
,
@key
.
shell_id
,
@key
.
key
)
Git
labShell
Worker
.
should_receive
(
:perform_async
).
with
(
:add_key
,
@key
.
shell_id
,
@key
.
key
)
@observer
.
after_save
(
@key
)
@observer
.
after_save
(
@key
)
end
end
end
end
context
:after_destroy
do
context
:after_destroy
do
it
do
it
do
Git
olite
Worker
.
should_receive
(
:perform_async
).
with
(
:remove_key
,
@key
.
shell_id
,
@key
.
key
)
Git
labShell
Worker
.
should_receive
(
:perform_async
).
with
(
:remove_key
,
@key
.
shell_id
,
@key
.
key
)
@observer
.
after_destroy
(
@key
)
@observer
.
after_destroy
(
@key
)
end
end
end
end
...
...
spec/workers/post_receive_spec.rb
View file @
ab0cfc00
...
@@ -39,6 +39,6 @@ describe PostReceive do
...
@@ -39,6 +39,6 @@ describe PostReceive do
end
end
def
pwd
(
project
)
def
pwd
(
project
)
File
.
join
(
Gitlab
.
config
.
git
olite
.
repos_path
,
project
.
path_with_namespace
)
File
.
join
(
Gitlab
.
config
.
git
lab_shell
.
repos_path
,
project
.
path_with_namespace
)
end
end
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