mirror of
https://github.com/mas-cli/mas
synced 2025-02-16 12:38:30 +00:00
🤡 Use mock network response in LuckyCommandSpec
This commit is contained in:
parent
212461caee
commit
cfc2bef921
1 changed files with 6 additions and 3 deletions
|
@ -13,13 +13,16 @@ import Quick
|
|||
|
||||
public class LuckyCommandSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
let networkSession = NetworkSessionMockFromFile(responseFile: "search/slack.json")
|
||||
let storeSearch = MasStoreSearch(networkManager: NetworkManager(session: networkSession))
|
||||
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
}
|
||||
describe("lucky command") {
|
||||
xit("installs the first app matching a search") {
|
||||
let cmd = LuckyCommand()
|
||||
let result = cmd.run(LuckyCommand.Options(appName: "", forceInstall: false))
|
||||
it("installs the first app matching a search") {
|
||||
let cmd = LuckyCommand(storeSearch: storeSearch)
|
||||
let result = cmd.run(LuckyCommand.Options(appName: "Slack", forceInstall: false))
|
||||
expect(result).to(beSuccess())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue