summaryrefslogtreecommitdiff
path: root/spec/gitlab_projects_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/gitlab_projects_spec.rb')
-rw-r--r--spec/gitlab_projects_spec.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/gitlab_projects_spec.rb b/spec/gitlab_projects_spec.rb
index cbe1ab2..50d5023 100644
--- a/spec/gitlab_projects_spec.rb
+++ b/spec/gitlab_projects_spec.rb
@@ -18,7 +18,7 @@ describe GitlabProjects do
it { @gl_projects.project_name.should == repo_name }
it { @gl_projects.instance_variable_get(:@command).should == 'add-project' }
- it { @gl_projects.instance_variable_get(:@full_path).should == '/home/git/repositories/gitlab-ci.git' }
+ it { @gl_projects.instance_variable_get(:@full_path).should == "#{GitlabConfig.new.repos_path}/gitlab-ci.git" }
end
describe :add_project do
@@ -77,6 +77,17 @@ describe GitlabProjects do
end
end
+ describe :fork_project do
+ let(:gl_projects) { build_gitlab_projects('fork-project', repo_name, 'forked-to-namespace')}
+
+ it "should fork the repo" do
+ gl_projects.exec
+ File.exists?(File.join(tmp_repo_path, 'forked-to-namespace', repo_name))
+ File.exists?(File.join(tmp_repo_path, 'forked-to-namespace', repo_name, '/hooks/update/post-receive'))
+ File.exists?(File.join(tmp_repo_path, 'forked-to-namespace', repo_name, '/hooks/update/'))
+ end
+ end
+
describe :exec do
it 'should puts message if unknown command arg' do
gitlab_projects = build_gitlab_projects('edit-project', repo_name)