diff options
author | Angus MacArthur <amacarthur@blackberry.com> | 2013-03-28 11:59:48 -0400 |
---|---|---|
committer | Angus MacArthur <amacarthur@blackberry.com> | 2013-04-11 01:12:18 -0400 |
commit | a471d5526249654f93dae8d88b92c2cddb287178 (patch) | |
tree | 5f6b1b6d89285d2ae7439b2e70678b5894aba2c7 /spec/gitlab_projects_spec.rb | |
parent | 8e75018c538d422c8273e2dbcde65404fe8fd42b (diff) | |
download | gitlab-shell-a471d5526249654f93dae8d88b92c2cddb287178.tar.gz |
add fork_project command
Diffstat (limited to 'spec/gitlab_projects_spec.rb')
-rw-r--r-- | spec/gitlab_projects_spec.rb | 13 |
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) |