From fbfe5385ee69585f90934c6c5810c35b1213de2b Mon Sep 17 00:00:00 2001 From: Maximilian Blochberger Date: Sat, 21 Mar 2020 12:31:46 +0100 Subject: [PATCH] Add tests for purchase command --- .../Commands/PurchaseCommandSpec.swift | 24 +++++++++++++++++++ mas-cli.xcodeproj/project.pbxproj | 4 ++++ 2 files changed, 28 insertions(+) create mode 100644 MasKitTests/Commands/PurchaseCommandSpec.swift diff --git a/MasKitTests/Commands/PurchaseCommandSpec.swift b/MasKitTests/Commands/PurchaseCommandSpec.swift new file mode 100644 index 0000000..664af45 --- /dev/null +++ b/MasKitTests/Commands/PurchaseCommandSpec.swift @@ -0,0 +1,24 @@ +// +// PurchaseCommandSpec.swift +// MasKitTests +// +// Created by Maximilian Blochberger on 2020-03-21. +// Copyright © 2020 mas-cli. All rights reserved. +// + +@testable import MasKit +import Nimble +import Quick + +class PurchaseCommandSpec: QuickSpec { + override func spec() { + describe("purchase command") { + it("purchases apps") { + let cmd = PurchaseCommand() + let result = cmd.run(PurchaseCommand.Options(appIds: [])) + print(result) +// expect(result).to(beSuccess()) + } + } + } +} diff --git a/mas-cli.xcodeproj/project.pbxproj b/mas-cli.xcodeproj/project.pbxproj index 7894247..8c5cae6 100644 --- a/mas-cli.xcodeproj/project.pbxproj +++ b/mas-cli.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 60D8CF3624262F92005B4004 /* PurchaseCommandSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60D8CF3524262F92005B4004 /* PurchaseCommandSpec.swift */; }; 75FB3E761F9F7841005B6F20 /* Purchase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75FB3E751F9F7841005B6F20 /* Purchase.swift */; }; B537017421A0F85B00538F78 /* Commandant.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90CB406B213F4DDD0044E445 /* Commandant.framework */; }; B537017621A0F94200538F78 /* Commandant.framework in Copy Carthage Frameworks */ = {isa = PBXBuildFile; fileRef = 90CB406B213F4DDD0044E445 /* Commandant.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -192,6 +193,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 60D8CF3524262F92005B4004 /* PurchaseCommandSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PurchaseCommandSpec.swift; sourceTree = ""; }; 693A98981CBFFA760004D3B4 /* Search.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Search.swift; sourceTree = ""; }; 75FB3E751F9F7841005B6F20 /* Purchase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Purchase.swift; sourceTree = ""; }; 8078FAA71EC4F2FB004B5B3F /* Lucky.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Lucky.swift; sourceTree = ""; }; @@ -597,6 +599,7 @@ B594B14321D6D91800F3AC59 /* LuckyCommandSpec.swift */, B5DBF81221DEEC7C00F3B151 /* OpenCommandSpec.swift */, B594B14121D6D8EC00F3AC59 /* OutdatedCommandSpec.swift */, + 60D8CF3524262F92005B4004 /* PurchaseCommandSpec.swift */, B594B13F21D6D8BF00F3AC59 /* ResetCommandSpec.swift */, B594B13D21D6D78900F3AC59 /* SearchCommandSpec.swift */, B594B13B21D6D72E00F3AC59 /* SignInCommandSpec.swift */, @@ -1061,6 +1064,7 @@ B576FE3021E5BD130016B39D /* OutputListenerSpec.swift in Sources */, B594B14021D6D8BF00F3AC59 /* ResetCommandSpec.swift in Sources */, B594B13221D5876200F3AC59 /* ResultPredicates.swift in Sources */, + 60D8CF3624262F92005B4004 /* PurchaseCommandSpec.swift in Sources */, B594B13E21D6D78900F3AC59 /* SearchCommandSpec.swift in Sources */, B55B3D9221ED9B8C0009A1A5 /* SearchResultFormatterSpec.swift in Sources */, B594B13C21D6D72E00F3AC59 /* SignInCommandSpec.swift in Sources */,