2
0
Fork 0
mirror of https://github.com/mas-cli/mas synced 2024-12-20 00:43:16 +00:00
mas/Tests/masTests/Commands/OpenSpec.swift
Ross Goldberg e639341d11
Refactor to allow install & purchase to report unknown app IDs via console instead of cryptically via a dialog.
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-28 20:18:49 -04:00

34 lines
748 B
Swift

//
// OpenSpec.swift
// masTests
//
// Created by Ben Chatelain on 2019-01-03.
// Copyright © 2019 mas-cli. All rights reserved.
//
import Foundation
import Nimble
import Quick
@testable import mas
public class OpenSpec: QuickSpec {
override public func spec() {
let searcher = MockAppStoreSearcher()
beforeSuite {
MAS.initialize()
}
describe("open command") {
beforeEach {
searcher.reset()
}
it("can't find app with unknown ID") {
expect {
try MAS.Open.parse(["999"]).run(searcher: searcher)
}
.to(throwError(MASError.unknownAppID(999)))
}
}
}
}