Skip to content

Commit fec1995

Browse files
committed
Fix snapshot tests
1 parent 163349b commit fec1995

15 files changed

+4
-4
lines changed

β€ŽStreamChatSwiftUITests/Tests/ChatChannel/ChatChannelViewModel_Tests.swiftβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class ChatChannelViewModel_Tests: StreamChatTestCase {
105105

106106
// Then
107107
let dateString = viewModel.currentDateString
108-
XCTAssert(dateString == expectedDate)
108+
XCTAssertEqual(dateString, expectedDate)
109109
}
110110

111111
func test_chatChannelVM_showReactionsOverlay() {

β€ŽStreamChatSwiftUITests/Tests/ChatChannelList/ChatChannelListItemView_Tests.swiftβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ final class ChatChannelListItemView_Tests: StreamChatTestCase {
155155

156156
func test_channelListItem_pollMessage_youVoted() throws {
157157
// Given
158-
let currentUserId = UserId.unique
158+
let currentUserId = Self.currentUserId
159159
let message = try mockPollMessage(isSentByCurrentUser: false, latestVotes: [
160160
.mock(pollId: .unique, optionId: .unique, user: .mock(id: currentUserId)),
161161
.unique,
@@ -179,7 +179,7 @@ final class ChatChannelListItemView_Tests: StreamChatTestCase {
179179

180180
func test_channelListItem_pollMessage_someoneVoted() throws {
181181
// Given
182-
let currentUserId = UserId.unique
182+
let currentUserId = Self.currentUserId
183183
let message = try mockPollMessage(isSentByCurrentUser: false, latestVotes: [
184184
.mock(pollId: .unique, optionId: .unique, user: .mock(id: .unique, name: "Steve Jobs")),
185185
.unique,
@@ -331,7 +331,7 @@ final class ChatChannelListItemView_Tests: StreamChatTestCase {
331331
isSentByCurrentUser: isSentByCurrentUser,
332332
poll: .mock(
333333
name: "Test poll",
334-
createdBy: .mock(id: "test", name: "test"),
334+
createdBy: .mock(id: isSentByCurrentUser ? Self.currentUserId : "test", name: "test"),
335335
latestVotes: latestVotes
336336
)
337337
)
-83.7 KB
Loading
517 Bytes
Loading
Loading
Loading
Loading
Loading
517 Bytes
Loading
517 Bytes
Loading

0 commit comments

Comments
Β (0)