This commit is contained in:
Camden Narzt 2017-08-21 11:13:25 -06:00
parent c53af2952e
commit ab8a6f31e8
No known key found for this signature in database
GPG Key ID: E349304DE45D816B

View File

@ -200,6 +200,17 @@ describe GitDownloadStrategy do
end
end
describe CurlDownloadStrategy do
subject { described_class.new(name, resource) }
let(:name) { "foo" }
let(:url) { "http://example.com/foo.tar.gz" }
let(:resource) { double(Resource, url: url, mirrors: [], specs: {user: "download:123456"}, version: nil) }
it "parses the opts and sets the corresponding args" do
expect(subject.send(:_curl_opts)).to eq(["--user","download:123456"])
end
end
describe DownloadStrategyDetector do
describe "::detect" do
subject { described_class.detect(url) }