gitlab-org--gitlab-foss/spec/lib/gitlab/workhorse_spec.rb
2016-02-02 14:09:55 +01:00

18 lines
514 B
Ruby

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, "master", "zip") }.to raise_error(RuntimeError)
end
end
end
end