mirror of
https://github.com/mas-cli/mas
synced 2024-11-21 19:23:01 +00:00
Remove unnecessary tests.
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
This commit is contained in:
parent
9eef8b6cb8
commit
e4bc69cf5d
4 changed files with 0 additions and 63 deletions
|
@ -22,29 +22,12 @@ public class HomeSpec: QuickSpec {
|
||||||
beforeEach {
|
beforeEach {
|
||||||
searcher.reset()
|
searcher.reset()
|
||||||
}
|
}
|
||||||
it("fails to open app with invalid ID") {
|
|
||||||
expect {
|
|
||||||
try MAS.Home.parse(["--", "-999"]).run(searcher: searcher)
|
|
||||||
}
|
|
||||||
.to(throwError())
|
|
||||||
}
|
|
||||||
it("can't find app with unknown ID") {
|
it("can't find app with unknown ID") {
|
||||||
expect {
|
expect {
|
||||||
try MAS.Home.parse(["999"]).run(searcher: searcher)
|
try MAS.Home.parse(["999"]).run(searcher: searcher)
|
||||||
}
|
}
|
||||||
.to(throwError(MASError.noSearchResultsFound))
|
.to(throwError(MASError.noSearchResultsFound))
|
||||||
}
|
}
|
||||||
it("opens app on MAS Preview") {
|
|
||||||
let mockResult = SearchResult(
|
|
||||||
trackId: 1111,
|
|
||||||
trackViewUrl: "mas preview url",
|
|
||||||
version: "0.0"
|
|
||||||
)
|
|
||||||
searcher.apps[mockResult.trackId] = mockResult
|
|
||||||
expect {
|
|
||||||
try MAS.Home.parse([String(mockResult.trackId)]).run(searcher: searcher)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,12 +23,6 @@ public class InfoSpec: QuickSpec {
|
||||||
beforeEach {
|
beforeEach {
|
||||||
searcher.reset()
|
searcher.reset()
|
||||||
}
|
}
|
||||||
it("fails to open app with invalid ID") {
|
|
||||||
expect {
|
|
||||||
try MAS.Info.parse(["--", "-999"]).run(searcher: searcher)
|
|
||||||
}
|
|
||||||
.to(throwError())
|
|
||||||
}
|
|
||||||
it("can't find app with unknown ID") {
|
it("can't find app with unknown ID") {
|
||||||
expect {
|
expect {
|
||||||
try MAS.Info.parse(["999"]).run(searcher: searcher)
|
try MAS.Info.parse(["999"]).run(searcher: searcher)
|
||||||
|
|
|
@ -23,34 +23,12 @@ public class OpenSpec: QuickSpec {
|
||||||
beforeEach {
|
beforeEach {
|
||||||
searcher.reset()
|
searcher.reset()
|
||||||
}
|
}
|
||||||
it("fails to open app with invalid ID") {
|
|
||||||
expect {
|
|
||||||
try MAS.Open.parse(["--", "-999"]).run(searcher: searcher)
|
|
||||||
}
|
|
||||||
.to(throwError())
|
|
||||||
}
|
|
||||||
it("can't find app with unknown ID") {
|
it("can't find app with unknown ID") {
|
||||||
expect {
|
expect {
|
||||||
try MAS.Open.parse(["999"]).run(searcher: searcher)
|
try MAS.Open.parse(["999"]).run(searcher: searcher)
|
||||||
}
|
}
|
||||||
.to(throwError(MASError.noSearchResultsFound))
|
.to(throwError(MASError.noSearchResultsFound))
|
||||||
}
|
}
|
||||||
xit("opens app in MAS") {
|
|
||||||
let mockResult = SearchResult(
|
|
||||||
trackId: 1111,
|
|
||||||
trackViewUrl: "fakescheme://some/url",
|
|
||||||
version: "0.0"
|
|
||||||
)
|
|
||||||
searcher.apps[mockResult.trackId] = mockResult
|
|
||||||
expect {
|
|
||||||
try MAS.Open.parse([mockResult.trackId.description]).run(searcher: searcher)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
xit("just opens MAS if no app specified") {
|
|
||||||
expect {
|
|
||||||
try MAS.Open.parse([]).run(searcher: searcher)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,30 +22,12 @@ public class VendorSpec: QuickSpec {
|
||||||
beforeEach {
|
beforeEach {
|
||||||
searcher.reset()
|
searcher.reset()
|
||||||
}
|
}
|
||||||
it("fails to open app with invalid ID") {
|
|
||||||
expect {
|
|
||||||
try MAS.Vendor.parse(["--", "-999"]).run(searcher: searcher)
|
|
||||||
}
|
|
||||||
.to(throwError())
|
|
||||||
}
|
|
||||||
it("can't find app with unknown ID") {
|
it("can't find app with unknown ID") {
|
||||||
expect {
|
expect {
|
||||||
try MAS.Vendor.parse(["999"]).run(searcher: searcher)
|
try MAS.Vendor.parse(["999"]).run(searcher: searcher)
|
||||||
}
|
}
|
||||||
.to(throwError(MASError.noSearchResultsFound))
|
.to(throwError(MASError.noSearchResultsFound))
|
||||||
}
|
}
|
||||||
it("opens vendor app page in browser") {
|
|
||||||
let mockResult = SearchResult(
|
|
||||||
sellerUrl: "https://awesome.app",
|
|
||||||
trackId: 1111,
|
|
||||||
trackViewUrl: "https://apps.apple.com/us/app/awesome/id1111?mt=12&uo=4",
|
|
||||||
version: "0.0"
|
|
||||||
)
|
|
||||||
searcher.apps[mockResult.trackId] = mockResult
|
|
||||||
expect {
|
|
||||||
try MAS.Vendor.parse([String(mockResult.trackId)]).run(searcher: searcher)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue