summaryrefslogtreecommitdiff
path: root/spec/gitlab_projects_spec.rb
diff options
context:
space:
mode:
authorDavid Martin <david.martin@feedhenry.com>2014-09-17 11:35:16 +0100
committerDavid Martin <david.martin@feedhenry.com>2014-10-15 10:28:12 +0100
commit6cd167eaac7b764bcaefe31a9144dd38992cc9ab (patch)
tree9528e100c69d4e2142edfaaa44701a693546ee4d /spec/gitlab_projects_spec.rb
parent7e74d0547255a9cf60f00b9d9133aa8b2c546507 (diff)
downloadgitlab-shell-6cd167eaac7b764bcaefe31a9144dd38992cc9ab.tar.gz
Added list-projects command & spec
list-projects command usage Single quotes Use single quotes Use single quotes
Diffstat (limited to 'spec/gitlab_projects_spec.rb')
-rw-r--r--spec/gitlab_projects_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/gitlab_projects_spec.rb b/spec/gitlab_projects_spec.rb
index 0060fa9..a592e62 100644
--- a/spec/gitlab_projects_spec.rb
+++ b/spec/gitlab_projects_spec.rb
@@ -135,6 +135,22 @@ describe GitlabProjects do
end
end
+ describe :list_projects do
+ let(:gl_projects) do
+ build_gitlab_projects('add-project', "list_test/#{repo_name}")
+ end
+
+ before do
+ FileUtils.mkdir_p(tmp_repos_path)
+ end
+
+ it 'should create projects and list them' do
+ GitlabProjects.stub(create_hooks: true)
+ gl_projects.exec
+ gl_projects.send(:list_projects).should == ["list_test/#{repo_name}"]
+ end
+ end
+
describe :mv_project do
let(:gl_projects) { build_gitlab_projects('mv-project', repo_name, 'repo.git') }
let(:new_repo_path) { File.join(tmp_repos_path, 'repo.git') }