-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
69175f6
commit 724c729
Showing
7 changed files
with
270 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
GliaWidgetsTests/Sources/EngagementLauncher/EngagementLauncherTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import XCTest | ||
|
||
@testable import GliaWidgets | ||
|
||
final class EngagementLauncherTests: XCTestCase { | ||
|
||
func test_startChat() throws { | ||
var chatEngagement: EngagementKind? | ||
var engagementLauncher = EngagementLauncher { engagementKind, _ in | ||
chatEngagement = engagementKind | ||
} | ||
|
||
try engagementLauncher.startChat() | ||
|
||
XCTAssertEqual(chatEngagement, .chat) | ||
} | ||
|
||
func test_startAudioCall() throws { | ||
var chatEngagement: EngagementKind? | ||
var engagementLauncher = EngagementLauncher { engagementKind, _ in | ||
chatEngagement = engagementKind | ||
} | ||
|
||
try engagementLauncher.startAudioCall() | ||
|
||
XCTAssertEqual(chatEngagement, .audioCall) | ||
} | ||
|
||
func test_startVideoCall() throws { | ||
var chatEngagement: EngagementKind? | ||
var engagementLauncher = EngagementLauncher { engagementKind, _ in | ||
chatEngagement = engagementKind | ||
} | ||
|
||
try engagementLauncher.startVideoCall() | ||
|
||
XCTAssertEqual(chatEngagement, .videoCall) | ||
} | ||
|
||
func test_startSecureMessaging() throws { | ||
var chatEngagement: EngagementKind? | ||
var engagementLauncher = EngagementLauncher { engagementKind, _ in | ||
chatEngagement = engagementKind | ||
} | ||
|
||
try engagementLauncher.startSecureMessaging() | ||
|
||
XCTAssertEqual(chatEngagement, .messaging(.welcome)) | ||
} | ||
} |
Oops, something went wrong.