From 804d20742f9ccec997aad72ed0d678c5ac57c8c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Fri, 15 Apr 2016 11:48:19 +0200 Subject: Remove the update-head command since GitLab doesn't use it anymore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- spec/gitlab_projects_spec.rb | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'spec/gitlab_projects_spec.rb') diff --git a/spec/gitlab_projects_spec.rb b/spec/gitlab_projects_spec.rb index 50af42f..072c2a9 100644 --- a/spec/gitlab_projects_spec.rb +++ b/spec/gitlab_projects_spec.rb @@ -258,33 +258,6 @@ describe GitlabProjects do end end - 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) - system(*%W(git init --bare #{tmp_repo_path})) - FileUtils.touch(File.join(tmp_repo_path, "refs/heads/stable")) - File.read(File.join(tmp_repo_path, 'HEAD')).strip.should == 'ref: refs/heads/master' - end - - it "should update head for repo" do - gl_projects.exec.should be_true - File.read(File.join(tmp_repo_path, 'HEAD')).strip.should == 'ref: refs/heads/stable' - end - - it "should log an update_head event" do - $logger.should_receive(:info).with("Update head in project #{repo_name} to .") - 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 context 'success import' do let(:gl_projects) { build_gitlab_projects('import-project', repo_name, 'https://github.com/randx/six.git') } -- cgit v1.2.1