mirror of
https://github.com/MessageKit/MessageKit.git
synced 2026-02-06 19:03:19 +00:00
Fix tests
This commit is contained in:
+2
-2
@@ -1,3 +1,3 @@
|
||||
github "Quick/Nimble" "v8.0.1"
|
||||
github "Quick/Quick" "v2.0.0"
|
||||
github "Quick/Nimble" "v8.0.5"
|
||||
github "Quick/Quick" "v2.2.0"
|
||||
github "nathantannar4/InputBarAccessoryView" "4.3.0"
|
||||
|
||||
@@ -71,7 +71,7 @@ class MessagesDisplayDelegateTests: XCTestCase {
|
||||
at: IndexPath(item: 0, section: 0),
|
||||
in: sut.messagesCollectionView)
|
||||
|
||||
XCTAssertEqual(backgroundColor, .white)
|
||||
XCTAssertEqual(backgroundColor, .backgroundColor)
|
||||
}
|
||||
|
||||
func testBackgroundColorForMessageWithEmoji_returnsClearForDefault() {
|
||||
@@ -143,7 +143,7 @@ class TextMessageDisplayDelegateTests: XCTestCase {
|
||||
at: IndexPath(item: 0, section: 0),
|
||||
in: sut.messagesCollectionView)
|
||||
|
||||
XCTAssertEqual(textColor, .white)
|
||||
XCTAssertEqual(textColor, .backgroundColor)
|
||||
}
|
||||
|
||||
func testTextColorFromYou_returnsDarkTextForDefault() {
|
||||
@@ -151,7 +151,7 @@ class TextMessageDisplayDelegateTests: XCTestCase {
|
||||
at: IndexPath(item: 0, section: 0),
|
||||
in: sut.messagesCollectionView)
|
||||
|
||||
XCTAssertEqual(textColor, .darkText)
|
||||
XCTAssertEqual(textColor, .labelColor)
|
||||
}
|
||||
|
||||
func testTextColorWithoutDataSource_returnsDarkTextForDefault() {
|
||||
@@ -161,7 +161,7 @@ class TextMessageDisplayDelegateTests: XCTestCase {
|
||||
at: IndexPath(item: 0, section: 0),
|
||||
in: sut.messagesCollectionView)
|
||||
|
||||
XCTAssertEqual(textColor, .darkText)
|
||||
XCTAssertEqual(textColor, .labelColor)
|
||||
}
|
||||
|
||||
func testEnableDetectors_returnsEmptyForDefault() {
|
||||
|
||||
@@ -42,7 +42,9 @@ class AvatarViewTests: XCTestCase {
|
||||
|
||||
func testNoParams() {
|
||||
XCTAssertEqual(avatarView.layer.cornerRadius, 15.0)
|
||||
XCTAssertEqual(avatarView.backgroundColor, UIColor.gray)
|
||||
// For certain dynamic colors, need to compare cgColor in XCTest
|
||||
// https://stackoverflow.com/questions/58065340/how-to-compare-two-uidynamicprovidercolor
|
||||
XCTAssertEqual(avatarView.backgroundColor!.cgColor, UIColor.grayColor.cgColor)
|
||||
}
|
||||
|
||||
func testWithImage() {
|
||||
@@ -50,7 +52,7 @@ class AvatarViewTests: XCTestCase {
|
||||
avatarView.set(avatar: avatar)
|
||||
XCTAssertEqual(avatar.initials, "?")
|
||||
XCTAssertEqual(avatarView.layer.cornerRadius, 15.0)
|
||||
XCTAssertEqual(avatarView.backgroundColor, UIColor.gray)
|
||||
XCTAssertEqual(avatarView.backgroundColor!.cgColor, UIColor.grayColor.cgColor)
|
||||
}
|
||||
|
||||
func testInitialsOnly() {
|
||||
@@ -59,13 +61,13 @@ class AvatarViewTests: XCTestCase {
|
||||
XCTAssertEqual(avatarView.initials, avatar.initials)
|
||||
XCTAssertEqual(avatar.initials, "DL")
|
||||
XCTAssertEqual(avatarView.layer.cornerRadius, 15.0)
|
||||
XCTAssertEqual(avatarView.backgroundColor, UIColor.gray)
|
||||
XCTAssertEqual(avatarView.backgroundColor!.cgColor, UIColor.grayColor.cgColor)
|
||||
}
|
||||
|
||||
func testSetBackground() {
|
||||
XCTAssertEqual(avatarView.backgroundColor, UIColor.gray)
|
||||
XCTAssertEqual(avatarView.backgroundColor!.cgColor, UIColor.grayColor.cgColor)
|
||||
avatarView.backgroundColor = UIColor.red
|
||||
XCTAssertEqual(avatarView.backgroundColor, UIColor.red)
|
||||
XCTAssertEqual(avatarView.backgroundColor!, UIColor.red)
|
||||
}
|
||||
|
||||
func testGetImage() {
|
||||
|
||||
Reference in New Issue
Block a user