Fix search & uninstall tests.

Partial #592

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
This commit is contained in:
Ross Goldberg 2024-10-16 15:13:29 -04:00
parent e62169eeaa
commit c2892626d7
No known key found for this signature in database
2 changed files with 6 additions and 3 deletions

View file

@ -6,6 +6,7 @@
// Copyright © 2018 mas-cli. All rights reserved.
//
import Foundation
import Nimble
import Quick
@ -31,9 +32,11 @@ public class SearchSpec: QuickSpec {
)
storeSearch.apps[mockResult.trackId] = mockResult
expect {
try Mas.Search.parse(["slack"]).run(storeSearch: storeSearch)
try captureStream(stdout) {
try Mas.Search.parse(["slack"]).run(storeSearch: storeSearch)
}
}
.toNot(throwError())
== " 1111 slack (0.0)\n"
}
it("fails when searching for nonexistent app") {
expect {

View file

@ -67,7 +67,7 @@ public class UninstallSpec: QuickSpec {
try uninstall.run(appLibrary: mockLibrary)
}
}
== " 1111 slack (0.0)\n==> Some App /tmp/Some.app\n==> (not removed, dry run)\n"
== "==> Some App /tmp/Some.app\n==> (not removed, dry run)\n"
}
it("fails if there is a problem with the trash command") {
var brokenUninstall = app // make mutable copy