test/livecheck: add extract_plist livecheck url test
This commit is contained in:
parent
25e34919cb
commit
0211a23c1f
@ -114,5 +114,15 @@ RSpec.describe Homebrew::Livecheck::Strategy::ExtractPlist do
|
||||
expect(installer_artifact).to be_a(Cask::Artifact::Installer)
|
||||
expect(installer_artifact.path).to be_a(Pathname)
|
||||
end
|
||||
|
||||
it "uses the provided livecheck url", :needs_macos do
|
||||
cask = Cask::CaskLoader.load(cask_path("livecheck/livecheck-extract-plist"))
|
||||
livecheck_url = "file://#{TEST_FIXTURE_DIR}/cask/caffeine-with-plist.zip"
|
||||
|
||||
expect(Homebrew::UnversionedCaskChecker).to receive(:new).with(cask).and_call_original
|
||||
result = described_class.find_versions(cask:, url: livecheck_url)
|
||||
expect(result)
|
||||
.to eq({ matches: { "1.2.3"=> @version="1.2.3" }, regex: nil, url: livecheck_url })
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user