From f38ac3943f2f381fb8f7a969c3531d8980757753 Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Sat, 28 Jan 2023 02:39:23 -0600 Subject: [PATCH] Fix tests --- Library/Homebrew/test/cask/cmd/list_spec.rb | 62 +++++++++++++++++++-- 1 file changed, 56 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/test/cask/cmd/list_spec.rb b/Library/Homebrew/test/cask/cmd/list_spec.rb index dc3c4a6609..8d397e19f4 100644 --- a/Library/Homebrew/test/cask/cmd/list_spec.rb +++ b/Library/Homebrew/test/cask/cmd/list_spec.rb @@ -84,7 +84,10 @@ describe Cask::Cmd::List, :cask do end describe "lists json" do - let(:casks) { ["local-caffeine", "local-transmission", "multiple-versions", "third-party/tap/third-party-cask"] } + let(:casks) { + ["local-caffeine", "local-transmission", "multiple-versions", "with-languages", + "third-party/tap/third-party-cask"] + } let(:expected_output) { <<~EOS [ @@ -124,7 +127,10 @@ describe Cask::Cmd::List, :cask do }, "conflicts_with": null, "container": null, - "auto_updates": null + "auto_updates": null, + "languages": [ + + ] }, { "token": "local-transmission", @@ -155,7 +161,10 @@ describe Cask::Cmd::List, :cask do }, "conflicts_with": null, "container": null, - "auto_updates": null + "auto_updates": null, + "languages": [ + + ] }, { "token": "multiple-versions", @@ -189,7 +198,10 @@ describe Cask::Cmd::List, :cask do }, "conflicts_with": null, "container": null, - "auto_updates": null + "auto_updates": null, + "languages": [ + + ] }, { "token": "third-party-cask", @@ -220,7 +232,45 @@ describe Cask::Cmd::List, :cask do }, "conflicts_with": null, "container": null, - "auto_updates": null + "auto_updates": null, + "languages": [ + + ] + }, + { + "token": "with-languages", + "full_token": "with-languages", + "tap": "homebrew/cask", + "name": [ + + ], + "desc": null, + "homepage": "https://brew.sh/", + "url": "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip", + "appcast": null, + "version": "1.2.3", + "versions": { + }, + "installed": "1.2.3", + "outdated": false, + "sha256": "xyz789", + "artifacts": [ + { + "app": [ + "Caffeine.app" + ] + } + ], + "caveats": null, + "depends_on": { + }, + "conflicts_with": null, + "container": null, + "auto_updates": null, + "languages": [ + "zh", + "en-US" + ] } ] EOS @@ -257,7 +307,7 @@ describe Cask::Cmd::List, :cask do it "of given Casks" do expect { described_class.run("--json", "local-caffeine", "local-transmission", "multiple-versions", - "third-party/tap/third-party-cask") + "third-party/tap/third-party-cask", "with-languages") }.to output(expected_output).to_stdout end end