From e4bc69cf5d83ed41ebb26c872121ed9254427696 Mon Sep 17 00:00:00 2001 From: Ross Goldberg <484615+rgoldberg@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:23:20 -0400 Subject: [PATCH] Remove unnecessary tests. Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com> --- Tests/masTests/Commands/HomeSpec.swift | 17 ----------------- Tests/masTests/Commands/InfoSpec.swift | 6 ------ Tests/masTests/Commands/OpenSpec.swift | 22 ---------------------- Tests/masTests/Commands/VendorSpec.swift | 18 ------------------ 4 files changed, 63 deletions(-) diff --git a/Tests/masTests/Commands/HomeSpec.swift b/Tests/masTests/Commands/HomeSpec.swift index c92b58b..1bfc3f7 100644 --- a/Tests/masTests/Commands/HomeSpec.swift +++ b/Tests/masTests/Commands/HomeSpec.swift @@ -22,29 +22,12 @@ public class HomeSpec: QuickSpec { beforeEach { 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") { expect { try MAS.Home.parse(["999"]).run(searcher: searcher) } .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) - } - } } } } diff --git a/Tests/masTests/Commands/InfoSpec.swift b/Tests/masTests/Commands/InfoSpec.swift index 04b393c..b46465c 100644 --- a/Tests/masTests/Commands/InfoSpec.swift +++ b/Tests/masTests/Commands/InfoSpec.swift @@ -23,12 +23,6 @@ public class InfoSpec: QuickSpec { beforeEach { 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") { expect { try MAS.Info.parse(["999"]).run(searcher: searcher) diff --git a/Tests/masTests/Commands/OpenSpec.swift b/Tests/masTests/Commands/OpenSpec.swift index 081201d..6861740 100644 --- a/Tests/masTests/Commands/OpenSpec.swift +++ b/Tests/masTests/Commands/OpenSpec.swift @@ -23,34 +23,12 @@ public class OpenSpec: QuickSpec { beforeEach { 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") { expect { try MAS.Open.parse(["999"]).run(searcher: searcher) } .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) - } - } } } } diff --git a/Tests/masTests/Commands/VendorSpec.swift b/Tests/masTests/Commands/VendorSpec.swift index 5c7eb95..6aa8d8f 100644 --- a/Tests/masTests/Commands/VendorSpec.swift +++ b/Tests/masTests/Commands/VendorSpec.swift @@ -22,30 +22,12 @@ public class VendorSpec: QuickSpec { beforeEach { 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") { expect { try MAS.Vendor.parse(["999"]).run(searcher: searcher) } .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) - } - } } } }