From 52491f4486d526f4d2ac18c0eb70cf79a90e1773 Mon Sep 17 00:00:00 2001 From: evazion Date: Thu, 20 Oct 2016 21:58:52 -0500 Subject: [PATCH] Fix @artist.ban! test case. Must use an admin in this test now because admin privileges are needed to create the `banned_artist` tag implication. (fixes regression in 7e3284c) --- test/unit/post_test.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/unit/post_test.rb b/test/unit/post_test.rb index 685bf442d..8fddae6b4 100644 --- a/test/unit/post_test.rb +++ b/test/unit/post_test.rb @@ -478,8 +478,10 @@ class PostTest < ActiveSupport::TestCase context "with a banned artist" do setup do - @artist = FactoryGirl.create(:artist) - @artist.ban! + CurrentUser.scoped(FactoryGirl.create(:admin_user)) do + @artist = FactoryGirl.create(:artist) + @artist.ban! + end @post = FactoryGirl.create(:post, :tag_string => @artist.name) end