workhorse_spec.rb 538 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
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
14
        expect { subject.send_git_archive(project.repository, ref: "master", format: "zip") }.to raise_error(RuntimeError)
15 16 17 18
      end
    end
  end
end