mirror of
https://github.com/mas-cli/mas
synced 2024-11-22 11:33:13 +00:00
Fix search & uninstall tests.
Partial #592 Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
This commit is contained in:
parent
e62169eeaa
commit
c2892626d7
2 changed files with 6 additions and 3 deletions
|
@ -6,6 +6,7 @@
|
||||||
// Copyright © 2018 mas-cli. All rights reserved.
|
// Copyright © 2018 mas-cli. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
import Nimble
|
import Nimble
|
||||||
import Quick
|
import Quick
|
||||||
|
|
||||||
|
@ -31,9 +32,11 @@ public class SearchSpec: QuickSpec {
|
||||||
)
|
)
|
||||||
storeSearch.apps[mockResult.trackId] = mockResult
|
storeSearch.apps[mockResult.trackId] = mockResult
|
||||||
expect {
|
expect {
|
||||||
|
try captureStream(stdout) {
|
||||||
try Mas.Search.parse(["slack"]).run(storeSearch: storeSearch)
|
try Mas.Search.parse(["slack"]).run(storeSearch: storeSearch)
|
||||||
}
|
}
|
||||||
.toNot(throwError())
|
}
|
||||||
|
== " 1111 slack (0.0)\n"
|
||||||
}
|
}
|
||||||
it("fails when searching for nonexistent app") {
|
it("fails when searching for nonexistent app") {
|
||||||
expect {
|
expect {
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class UninstallSpec: QuickSpec {
|
||||||
try uninstall.run(appLibrary: mockLibrary)
|
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") {
|
it("fails if there is a problem with the trash command") {
|
||||||
var brokenUninstall = app // make mutable copy
|
var brokenUninstall = app // make mutable copy
|
||||||
|
|
Loading…
Reference in a new issue