Skip to content

Commit

Permalink
🤡 Use mock network response in LuckyCommandSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
phatblat committed Nov 25, 2023
1 parent 35b8147 commit 8d16065
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Tests/MasKitTests/Commands/LuckyCommandSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
}
Expand Down

0 comments on commit 8d16065

Please sign in to comment.