mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Perform the where(...).first to find_by(...) refactoring.
This refactoring was automated using the command: bundle exec "ruby refactorings/where_dot_first_to_find_by/app.rb"
This commit is contained in:
@@ -167,7 +167,7 @@ describe PostCreator do
|
||||
first_post = creator.create
|
||||
|
||||
# ensure topic user is correct
|
||||
topic_user = first_post.user.topic_users.where(topic_id: first_post.topic_id).first
|
||||
topic_user = first_post.user.topic_users.find_by(topic_id: first_post.topic_id)
|
||||
topic_user.should be_present
|
||||
topic_user.should be_posted
|
||||
topic_user.last_read_post_number.should == first_post.post_number
|
||||
|
||||
Reference in New Issue
Block a user