diff options
author | Gabor Nagy <mail@aigeruth.hu> | 2014-06-22 22:45:06 +0200 |
---|---|---|
committer | Gabor Nagy <mail@aigeruth.hu> | 2014-06-23 20:52:45 +0200 |
commit | 32f1893298bc0108df89de0e543193af20bb0e7c (patch) | |
tree | 2fcff9cc992f4560be894f41938573ef3e6bb15e /spec/gitlab_projects_spec.rb | |
parent | ca425566d0266a1786019153757e283d7d246450 (diff) | |
download | gitlab-shell-32f1893298bc0108df89de0e543193af20bb0e7c.tar.gz |
Improve coverage.
Diffstat (limited to 'spec/gitlab_projects_spec.rb')
-rw-r--r-- | spec/gitlab_projects_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/gitlab_projects_spec.rb b/spec/gitlab_projects_spec.rb index 64cb63e..300029c 100644 --- a/spec/gitlab_projects_spec.rb +++ b/spec/gitlab_projects_spec.rb @@ -176,6 +176,7 @@ describe GitlabProjects do describe :update_head do let(:gl_projects) { build_gitlab_projects('update-head', repo_name, 'stable') } + let(:gl_projects_fail) { build_gitlab_projects 'update-head', repo_name } before do FileUtils.mkdir_p(tmp_repo_path) @@ -193,6 +194,11 @@ describe GitlabProjects do $logger.should_receive(:info).with("Update head in project #{repo_name} to <stable>.") gl_projects.exec end + + it "should failed and log an error" do + $logger.should_receive(:error).with("update-head failed: no branch provided.") + gl_projects_fail.exec.should be_false + end end describe :import_project do |