# typed: false

cask "livecheck-throttle" do
  version "1.2.5"
  sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"

  # This cask is used in --online tests, so we use fake URLs to avoid impacting
  # real servers. The URL paths are specific enough that they'll be
  # understandable if they appear in local server logs.
  url "http://localhost/homebrew/test/cask/audit/livecheck/livecheck-throttle-#{version}.dmg"
  name "Throttle"
  desc "Cask for testing throttle in a livecheck block"
  homepage "http://localhost/homebrew/test/cask/audit/livecheck/livecheck-throttle"

  # This check will not work, so livecheck values need to be controlled using a
  # test double.
  livecheck do
    url "http://localhost/homebrew/test/cask/audit/livecheck/livecheck-throttle-latest"
    throttle 5
  end

  app "TestCask.app"
end
