Skip to content

Commit 5de4162

Browse files
committed
Change ThreadFollower to NewThreadFollower following merge
1 parent 07378a1 commit 5de4162

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

app/controllers/posts_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def create
110110

111111
if @post.save
112112
@post.update(last_activity: @post.created_at, last_activity_by: current_user)
113-
ThreadFollower.create user: @post.user, post: @post
113+
NewThreadFollower.create user: @post.user, post: @post
114114
if @post_type.has_parent?
115115
unless @post.user_id == @post.parent.user_id
116116
@post.parent.user.create_notification("New response to your post #{@post.parent.title}",

test/controllers/comments/post_follow_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,18 @@ class CommentsControllerTest < ActionController::TestCase
5656
question = posts(:question_one)
5757

5858
# Assert user follows post
59-
assert_equal 1, ThreadFollower.where(['post_id = ? AND user_id = ?', question, user]).count
59+
assert_equal 1, NewThreadFollower.where(['post_id = ? AND user_id = ?', question, user]).count
6060

6161
try_post_unfollow(question)
6262
assert_response(:found)
6363

6464
# Assert user does not follow post
65-
assert_equal 0, ThreadFollower.where(['post_id = ? AND user_id = ?', question, user]).count
65+
assert_equal 0, NewThreadFollower.where(['post_id = ? AND user_id = ?', question, user]).count
6666

6767
try_post_follow(question)
6868
assert_response(:found)
6969

7070
# Assert user follows post
71-
assert_equal 1, ThreadFollower.where(['post_id = ? AND user_id = ?', question, user]).count
71+
assert_equal 1, NewThreadFollower.where(['post_id = ? AND user_id = ?', question, user]).count
7272
end
7373
end

test/controllers/posts/create_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class PostsControllerTest < ActionController::TestCase
139139
assert_response(:found)
140140

141141
# Assert user follows post
142-
assert_equal 1, ThreadFollower.where(['post_id = ? AND user_id = ?', assigns(:post), user]).count
142+
assert_equal 1, NewThreadFollower.where(['post_id = ? AND user_id = ?', assigns(:post), user]).count
143143
end
144144

145145
private

0 commit comments

Comments
 (0)