mirror of
https://github.com/mas-cli/mas
synced 2024-11-22 11:33:13 +00:00
22c6c57743
Stalls test when a MAS auth dialog stalls tests. Need more mocking.
30 lines
873 B
Swift
30 lines
873 B
Swift
//
|
|
// LuckyCommandSpec.swift
|
|
// MasKitTests
|
|
//
|
|
// Created by Ben Chatelain on 2018-12-28.
|
|
// Copyright © 2018 mas-cli. All rights reserved.
|
|
//
|
|
|
|
import Nimble
|
|
import Quick
|
|
|
|
@testable import MasKit
|
|
|
|
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(storeSearch: storeSearch)
|
|
let result = cmd.run(LuckyCommand.Options(appName: "Slack", forceInstall: false))
|
|
expect(result).to(beSuccess())
|
|
}
|
|
}
|
|
}
|
|
}
|