Refactor User#update_last_seen! and User#update_tracked_topics#1571
Refactor User#update_last_seen! and User#update_tracked_topics#1571eviltrout merged 1 commit intodiscourse:masterfrom
Conversation
|
You've signed the CLA, novemberkilo. Thank you! This pull request is ready for review. |
|
I've reviewed this PR and it looks good but one thing that scares me is the test coverage for |
|
I relied on not breaking any of the current test suite. |
|
thanks @novemberkilo I agree with @eviltrout here, any way we can increase / improve test coverage here? |
|
@eviltrout @SamSaffron I've generally attempted 'code cleanup' PRs as refactoring exercises that use the current test spec as a marker for whether the refactored code is at least as valid as the code it is replacing. I'm afraid I don't know the business rules for |
|
Actually I looked again and the coverage is not that bad. Our autotester had a bug that didn't refresh the class properly and I thought it was much worse. I'm happy to accept this, thanks! |
Refactor User#update_last_seen! and User#update_tracked_topics
Improves the score of the
Userclass by refactoring two of its most complex methods (per code climate).Refactors
User#update_last_seen!andUser#update_tracked_topics(This PR was written while wearing a Discourse t-shirt - thanks @SamSaffron 😄)