Welcome to mirror list, hosted at ThFree Co, Russian Federation.

workhorse_spec.rb « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c5c1402e8fcfc5d3d02aadb5859e93d395d1e401 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'spec_helper'

describe Gitlab::Workhorse, lib: true do
  let(:project) { create(:project) }
  let(:subject) { Gitlab::Workhorse }

  describe "#send_git_archive" do
    context "when the repository doesn't have an archive file path" do
      before do
        allow(project.repository).to receive(:archive_metadata).and_return(Hash.new)
      end

      it "raises an error" do
        expect { subject.send_git_archive(project.repository, ref: "master", format: "zip") }.to raise_error(RuntimeError)
      end
    end
  end
end