From 76eeafca2c714b3c4e6ede6a8b3148612c48a634 Mon Sep 17 00:00:00 2001 From: Albert Yi Date: Thu, 10 May 2018 11:24:17 -0700 Subject: [PATCH] fix for tests --- test/functional/moderator/post/posts_controller_test.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/functional/moderator/post/posts_controller_test.rb b/test/functional/moderator/post/posts_controller_test.rb index 8c014fd11..a13cab84f 100644 --- a/test/functional/moderator/post/posts_controller_test.rb +++ b/test/functional/moderator/post/posts_controller_test.rb @@ -71,13 +71,15 @@ module Moderator users = FactoryBot.create_list(:user, 2) users.each do |u| @child.add_favorite!(u) + @child.reload end post_auth move_favorites_moderator_post_post_path(@child.id), @admin, params: { commit: "Submit" } assert_redirected_to(@child) + @parent.reload as(@admin) do - assert_equal(users, @parent.reload.favorited_users) - assert_equal([], @child.reload.favorited_users) + assert_equal(users, @parent.favorited_users) + assert_equal([], @child.favorited_users) end end end