From 2d121b4ab9eefe11149838bfecbed88506d3e8c0 Mon Sep 17 00:00:00 2001 From: ArtOfCode- <hello@artofcode.co.uk> Date: Sun, 17 May 2020 00:26:06 +0100 Subject: [PATCH] It does but there's no easy way to test it --- test/models/post_test.rb | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/test/models/post_test.rb b/test/models/post_test.rb index eba54a1c0..29573c948 100644 --- a/test/models/post_test.rb +++ b/test/models/post_test.rb @@ -32,16 +32,6 @@ class PostTest < ActiveSupport::TestCase assert_equal previous_rep, post.user.reputation end - test 'adding an answer should increase answer_count' do - question = posts(:question_one) - pre_count = question.answer_count - Post.create(body_markdown: 'abcde fghij klmno pqrst uvwxyz', body: '<p>abcde fghij klmno pqrst uvwxyz</p>', - score: 0, user: users(:standard_user), parent: question, post_type_id: Answer.post_type_id, - category: question.category) - post_count = question.answer_count - assert_equal pre_count + 1, post_count - end - test 'reassigning post should move post votes and rep change' do post = posts(:question_one) rep_change = Vote.total_rep_change(post.votes) -- GitLab