-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix new created channels miss initial values #945
Conversation
Codecov Report
@@ Coverage Diff @@
## main #945 +/- ##
==========================================
+ Coverage 89.16% 89.19% +0.02%
==========================================
Files 203 203
Lines 8319 8335 +16
==========================================
+ Hits 7418 7434 +16
Misses 901 901
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -788,6 +788,179 @@ class ChannelController_Tests: StressTestCase { | |||
} | |||
} | |||
|
|||
// MARK: - New direct message channel creation tests | |||
|
|||
func setupControllerForNewDirectMessageChannel(currentUserId: UserId, otherUserId: UserId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it took me a while to realize this is not a test. Can you somehow make it more obvious? :) Maybe move it to an extension?
XCTAssertEqual(controller.channel?.cid, dummyChannel.channel.cid) | ||
XCTAssertEqual(controller.messages.count, dummyChannel.messages.count) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we assert the delegate calls here, too?
controller.callbackQueue = .testQueue(withId: controllerCallbackQueueID) | ||
} | ||
|
||
func test_controller_reportsInitialValues_forNewNonexistentDMChannel() throws { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> test_controller_reportsInitialValues_forDMChannel_ifChannelDoesntExistLocally
+
-> test_controller_reportsInitialValues_forDMChannel_ifChannelExistsLocally
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 Thank you
3fe1c63
to
8bbfd18
Compare
and include missing changelog entry for #945
and include missing changelog entry for #945
well.. I hope the comments clarify the issue enough, for our future selves' sake