Skip to content
Snippets Groups Projects
Unverified Commit 06215636 authored by nandahkrishna's avatar nandahkrishna
Browse files

livecheck: modified test

parent 2550af57
No related branches found
No related tags found
No related merge requests found
......@@ -13,8 +13,8 @@ describe Homebrew::Livecheck do
head "https://github.com/Homebrew/brew.git"
livecheck do
url "https://github.s3.amazonaws.com/Homebrew/brew/releases/latest"
regex(%r{href=.*?/tag/v?(\d+(?:\.\d+)+)["' >]}i)
url "https://formulae.brew.sh/api/formula/ruby.json"
regex(/"stable":"(\d+(?:\.\d+)+)"/i)
end
end
end
......@@ -138,8 +138,10 @@ describe Homebrew::Livecheck do
end
describe "::preprocess_url" do
let(:url) { "https://github.s3.amazonaws.com/Homebrew/brew/releases/latest" }
it "returns the preprocessed URL for livecheck to use" do
expect(livecheck.preprocess_url(f.livecheck.url))
expect(livecheck.preprocess_url(url))
.to eq("https://github.com/Homebrew/brew/releases/latest")
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment