fix tests

This commit is contained in:
Albert Yi
2018-06-20 11:11:46 -07:00
parent d240fdde66
commit e551ff9b0c
3 changed files with 7 additions and 8 deletions

View File

@@ -1823,6 +1823,13 @@ class PostTest < ActiveSupport::TestCase
assert_equal(user2.id, post.uploader_id)
assert_equal(user2.name, post.uploader_name)
end
should "increment the uploaders post_upload_count" do
assert_difference(-> { CurrentUser.user.post_upload_count }) do
post = FactoryBot.create(:post, uploader: CurrentUser.user)
CurrentUser.user.reload
end
end
end
end