2020-10-10 14:16:11 +02:00
|
|
|
# typed: false
|
2020-08-08 07:16:06 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require "livecheck/strategy/apache"
|
|
|
|
|
|
|
|
describe Homebrew::Livecheck::Strategy::Apache do
|
|
|
|
subject(:apache) { described_class }
|
|
|
|
|
|
|
|
let(:apache_url) { "https://www.apache.org/dyn/closer.lua?path=abc/1.2.3/def-1.2.3.tar.gz" }
|
|
|
|
let(:non_apache_url) { "https://brew.sh/test" }
|
|
|
|
|
|
|
|
describe "::match?" do
|
2021-08-10 17:39:11 -04:00
|
|
|
it "returns true for an Apache URL" do
|
2020-08-08 07:16:06 +05:30
|
|
|
expect(apache.match?(apache_url)).to be true
|
|
|
|
end
|
|
|
|
|
2021-08-10 17:39:11 -04:00
|
|
|
it "returns false for a non-Apache URL" do
|
2020-08-08 07:16:06 +05:30
|
|
|
expect(apache.match?(non_apache_url)).to be false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|