diff options
| author | Camden Narzt | 2017-08-21 11:13:25 -0600 | 
|---|---|---|
| committer | Camden Narzt | 2017-08-21 19:22:17 -0600 | 
| commit | ab8a6f31e81ab294c599f1137683c3489ebab0f7 (patch) | |
| tree | 327b31399648a8bf18a61d61725be0845ac45bd2 /Library/Homebrew/test | |
| parent | c53af2952e2ea60b47951ed4b74295be37cfc79d (diff) | |
| download | brew-ab8a6f31e81ab294c599f1137683c3489ebab0f7.tar.bz2 | |
Add test
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/download_strategies_spec.rb | 11 | 
1 files changed, 11 insertions, 0 deletions
diff --git a/Library/Homebrew/test/download_strategies_spec.rb b/Library/Homebrew/test/download_strategies_spec.rb index 8c376a649..07e18ffd0 100644 --- a/Library/Homebrew/test/download_strategies_spec.rb +++ b/Library/Homebrew/test/download_strategies_spec.rb @@ -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) }  | 
