Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
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
Kazuhiko Shiozaki
gitlab-shell
Commits
fc168367
Commit
fc168367
authored
Sep 01, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for GitlabPostReceive
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
119aae7d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
spec/gitlab_access_spec.rb
spec/gitlab_access_spec.rb
+2
-1
spec/gitlab_post_receive_spec.rb
spec/gitlab_post_receive_spec.rb
+18
-0
No files found.
spec/gitlab_access_spec.rb
View file @
fc168367
...
...
@@ -5,7 +5,7 @@ describe GitlabAccess do
let
(
:repository_path
)
{
"/home/git/repositories"
}
let
(
:repo_name
)
{
'dzaporozhets/gitlab-ci'
}
let
(
:repo_path
)
{
File
.
join
(
repository_path
,
repo_name
)
+
".git"
}
let
(
:gitlab_access
)
{
GitlabAccess
.
new
(
repo_path
,
'key-123'
,
''
)
}
let
(
:gitlab_access
)
{
GitlabAccess
.
new
(
repo_path
,
'key-123'
,
'
wow
'
)
}
before
do
GitlabConfig
.
any_instance
.
stub
(
repos_path:
repository_path
)
...
...
@@ -14,5 +14,6 @@ describe GitlabAccess do
describe
:initialize
do
it
{
gitlab_access
.
repo_name
.
should
==
repo_name
}
it
{
gitlab_access
.
repo_path
.
should
==
repo_path
}
it
{
gitlab_access
.
changes
.
should
==
[
'wow'
]
}
end
end
spec/gitlab_post_receive_spec.rb
0 → 100644
View file @
fc168367
require
'spec_helper'
require
'gitlab_post_receive'
describe
GitlabPostReceive
do
let
(
:repository_path
)
{
"/home/git/repositories"
}
let
(
:repo_name
)
{
'dzaporozhets/gitlab-ci'
}
let
(
:repo_path
)
{
File
.
join
(
repository_path
,
repo_name
)
+
".git"
}
let
(
:gitlab_post_receive
)
{
GitlabPostReceive
.
new
(
repo_path
,
'key-123'
,
'wow'
)
}
before
do
GitlabConfig
.
any_instance
.
stub
(
repos_path:
repository_path
)
end
describe
:initialize
do
it
{
gitlab_post_receive
.
repo_path
.
should
==
repo_path
}
it
{
gitlab_post_receive
.
changes
.
should
==
[
'wow'
]
}
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