cask/audit: fix tests

This commit is contained in:
Rylan Polster 2021-03-21 14:54:43 -04:00
parent 2b8d19e0bd
commit 83ebc5ef7e
No known key found for this signature in database
GPG Key ID: 46A744940CFF4D64

View File

@ -21,7 +21,7 @@ describe Cask::Cmd::Audit, :cask do
expect(Cask::CaskLoader).to receive(:load).with(cask_token, any_args).and_return(cask)
expect(Cask::Auditor).to receive(:audit)
.with(cask, audit_new_cask: false, quarantine: true, any_named_args: true)
.with(cask, audit_new_cask: false, quarantine: true, any_named_args: true, display_passes: true)
.and_return(result)
described_class.run(cask_token)
@ -31,7 +31,7 @@ describe Cask::Cmd::Audit, :cask do
it "does not pass anything if no flags are specified" do
allow(Cask::CaskLoader).to receive(:load).and_return(cask)
expect(Cask::Auditor).to receive(:audit)
.with(cask, audit_new_cask: false, quarantine: true, any_named_args: true)
.with(cask, audit_new_cask: false, quarantine: true, any_named_args: true, display_passes: true)
.and_return(result)
described_class.run("casktoken")
@ -40,7 +40,7 @@ describe Cask::Cmd::Audit, :cask do
it "passes `audit_download` if the `--download` flag is specified" do
allow(Cask::CaskLoader).to receive(:load).and_return(cask)
expect(Cask::Auditor).to receive(:audit)
.with(cask, audit_download: true, audit_new_cask: false, quarantine: true, any_named_args: true)
.with(cask, audit_download: true, audit_new_cask: false, quarantine: true, any_named_args: true, display_passes: true)
.and_return(result)
described_class.run("casktoken", "--download")
@ -49,7 +49,7 @@ describe Cask::Cmd::Audit, :cask do
it "passes `audit_token_conflicts` if the `--token-conflicts` flag is specified" do
allow(Cask::CaskLoader).to receive(:load).and_return(cask)
expect(Cask::Auditor).to receive(:audit)
.with(cask, audit_token_conflicts: true, audit_new_cask: false, quarantine: true, any_named_args: true)
.with(cask, audit_token_conflicts: true, audit_new_cask: false, quarantine: true, any_named_args: true, display_passes: true)
.and_return(result)
described_class.run("casktoken", "--token-conflicts")
@ -58,7 +58,7 @@ describe Cask::Cmd::Audit, :cask do
it "passes `audit_strict` if the `--strict` flag is specified" do
allow(Cask::CaskLoader).to receive(:load).and_return(cask)
expect(Cask::Auditor).to receive(:audit)
.with(cask, audit_strict: true, audit_new_cask: false, quarantine: true, any_named_args: true)
.with(cask, audit_strict: true, audit_new_cask: false, quarantine: true, any_named_args: true, display_passes: true)
.and_return(result)
described_class.run("casktoken", "--strict")
@ -67,7 +67,7 @@ describe Cask::Cmd::Audit, :cask do
it "passes `audit_online` if the `--online` flag is specified" do
allow(Cask::CaskLoader).to receive(:load).and_return(cask)
expect(Cask::Auditor).to receive(:audit)
.with(cask, audit_online: true, audit_new_cask: false, quarantine: true, any_named_args: true)
.with(cask, audit_online: true, audit_new_cask: false, quarantine: true, any_named_args: true, display_passes: true)
.and_return(result)
described_class.run("casktoken", "--online")
@ -76,7 +76,7 @@ describe Cask::Cmd::Audit, :cask do
it "passes `audit_new_cask` if the `--new-cask` flag is specified" do
allow(Cask::CaskLoader).to receive(:load).and_return(cask)
expect(Cask::Auditor).to receive(:audit)
.with(cask, audit_new_cask: true, quarantine: true, any_named_args: true)
.with(cask, audit_new_cask: true, quarantine: true, any_named_args: true, display_passes: true)
.and_return(result)
described_class.run("casktoken", "--new-cask")
@ -85,7 +85,7 @@ describe Cask::Cmd::Audit, :cask do
it "passes `language` if the `--language` flag is specified" do
allow(Cask::CaskLoader).to receive(:load).and_return(cask)
expect(Cask::Auditor).to receive(:audit)
.with(cask, audit_new_cask: false, quarantine: true, language: ["de-AT"], any_named_args: true)
.with(cask, audit_new_cask: false, quarantine: true, language: ["de-AT"], any_named_args: true, display_passes: true)
.and_return(result)
described_class.run("casktoken", "--language=de-AT")
@ -94,7 +94,7 @@ describe Cask::Cmd::Audit, :cask do
it "passes `quarantine` if the `--no-quarantine` flag is specified" do
allow(Cask::CaskLoader).to receive(:load).and_return(cask)
expect(Cask::Auditor).to receive(:audit)
.with(cask, audit_new_cask: false, quarantine: false, any_named_args: true)
.with(cask, audit_new_cask: false, quarantine: false, any_named_args: true, display_passes: true)
.and_return(result)
described_class.run("casktoken", "--no-quarantine")
@ -105,7 +105,7 @@ describe Cask::Cmd::Audit, :cask do
allow(Cask::CaskLoader).to receive(:load).and_return(cask)
expect(Cask::Auditor).to receive(:audit)
.with(cask, audit_new_cask: false, quarantine: false, any_named_args: true)
.with(cask, audit_new_cask: false, quarantine: false, any_named_args: true, display_passes: true)
.and_return(result)
described_class.run("casktoken")