diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-01 19:00:06 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-01 19:00:06 +0300 |
commit | 119aae7d71cac17af9a68122c8b3021adf5cbfd9 (patch) | |
tree | 40c4756ad1b647dd655c13b0805ecf14ae2be372 /spec/gitlab_access_spec.rb | |
parent | c6909d0c941784d60cb552d5685e1ff808323991 (diff) | |
download | gitlab-shell-119aae7d71cac17af9a68122c8b3021adf5cbfd9.tar.gz |
GitlabAccess and GitlabPostReceive classes added
Gitlab Access handles security check. GitlabPostReceive creates a sidekiq job
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/gitlab_access_spec.rb')
-rw-r--r-- | spec/gitlab_access_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/gitlab_access_spec.rb b/spec/gitlab_access_spec.rb new file mode 100644 index 0000000..81de152 --- /dev/null +++ b/spec/gitlab_access_spec.rb @@ -0,0 +1,18 @@ +require 'spec_helper' +require 'gitlab_access' + +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', '') } + + before do + GitlabConfig.any_instance.stub(repos_path: repository_path) + end + + describe :initialize do + it { gitlab_access.repo_name.should == repo_name } + it { gitlab_access.repo_path.should == repo_path } + end +end |