From bda643e513a4489fb0f52209c91210d3bbce4976 Mon Sep 17 00:00:00 2001 From: Albert Yi Date: Tue, 15 May 2018 16:27:29 -0700 Subject: [PATCH] remove post approval unit test (should be handled in controller) --- test/unit/post_test.rb | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/test/unit/post_test.rb b/test/unit/post_test.rb index 177bab802..30dcb0110 100644 --- a/test/unit/post_test.rb +++ b/test/unit/post_test.rb @@ -504,20 +504,6 @@ class PostTest < ActiveSupport::TestCase assert_equal(post.approver_id, CurrentUser.id) end - context "that was uploaded by person X" do - setup do - @post = FactoryBot.create(:post) - @post.flag!("reason") - end - - should "not allow person X to approve that post" do - approval = @post.approve!(@post.uploader) - - assert(@post.invalid?) - assert_includes(approval.errors.full_messages, "You cannot approve a post you uploaded") - end - end - context "that was previously approved by person X" do setup do @user = FactoryBot.create(:moderator_user, :name => "xxx")