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.rb6
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