Skip to content

Commit

Permalink
🔧 Test 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
chopmozzi committed Jan 11, 2024
1 parent 7cf0958 commit b45bb1a
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 7 deletions.
2 changes: 2 additions & 0 deletions iOS/Layover/Layover.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@
8363A32E2B4C329100772DDF /* PlaybackInteractorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = PlaybackInteractorTests.swift; path = LayoverTests/Mocks/Workers/PlaybackInteractorTests.swift; sourceTree = SOURCE_ROOT; };
8363A3322B4D6E9B00772DDF /* MockPlaybackWorker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockPlaybackWorker.swift; sourceTree = "<group>"; };
8363A3342B4FE14C00772DDF /* PlaybackWorkerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = PlaybackWorkerTests.swift; path = LayoverTests/Mocks/Workers/PlaybackWorkerTests.swift; sourceTree = SOURCE_ROOT; };
8363A3362B4FFBF200772DDF /* Layover.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = Layover.xctestplan; sourceTree = "<group>"; };
836C33862B15A29600ECAFB0 /* Toast.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Toast.swift; sourceTree = "<group>"; };
836C338A2B15D22C00ECAFB0 /* PlaybackConfigurator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlaybackConfigurator.swift; sourceTree = "<group>"; };
836C33902B17629400ECAFB0 /* MapRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapRouter.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1064,6 +1065,7 @@
FC7E452D2AFEB623004F155A = {
isa = PBXGroup;
children = (
8363A3362B4FFBF200772DDF /* Layover.xctestplan */,
19AACFC52B0F71DF0088143E /* Secrets.xcconfig */,
FC7E45692AFEC06E004F155A /* .swiftlint.yml */,
FC7E45382AFEB623004F155A /* Layover */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:Layover.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
skipped = "NO"
Expand Down
28 changes: 28 additions & 0 deletions iOS/Layover/Layover.xctestplan
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"configurations" : [
{
"id" : "C218E37B-184F-497C-A590-CD311A797E84",
"name" : "Test Scheme Action",
"options" : {

}
}
],
"defaultOptions" : {
"targetForVariableExpansion" : {
"containerPath" : "container:Layover.xcodeproj",
"identifier" : "FC7E45352AFEB623004F155A",
"name" : "Layover"
}
},
"testTargets" : [
{
"target" : {
"containerPath" : "container:Layover.xcodeproj",
"identifier" : "FC7E454B2AFEB62B004F155A",
"name" : "LayoverTests"
}
}
],
"version" : 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,6 @@ final class PlaybackInteractorTests: XCTestCase {
// act
await sut.fetchPosts()

try await Task.sleep(nanoseconds: 3_000_000_000)

// Assert
XCTAssertTrue(spy.presentLoadFetchVideosDidCalled, "fetchPosts가 presentLoadFetchVideos를 호출하지 않았습니다")
XCTAssertEqual(spy.presentLoadFetchVideosResponse.videos.count, 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ final class PlaybackWorkerTests: XCTestCase {
return (response, mockData, nil)
}

var result: [Post]?

// act
result = await sut.fetchHomePosts()
let result = await sut.fetchHomePosts()

// assert
XCTAssertNotNil(result)
Expand Down

0 comments on commit b45bb1a

Please sign in to comment.