tests: fix broken tests.

This commit is contained in:
evazion
2022-11-22 22:10:52 -06:00
parent b234727832
commit c8e3f957da
2 changed files with 5 additions and 7 deletions

View File

@@ -161,7 +161,6 @@ class UsersControllerTest < ActionDispatch::IntegrationTest
assert_redirected_to posts_path
assert_equal(true, @user.reload.is_deleted?)
assert_equal("Your account has been deactivated", flash[:notice])
assert_nil(session[:user_id])
assert_equal(true, @user.user_events.user_deletion.exists?)
end

View File

@@ -383,13 +383,12 @@ class PostTest < ActiveSupport::TestCase
end
context "with a banned artist" do
setup do
@artist = create(:artist, is_banned: true)
@post = FactoryBot.create(:post, :tag_string => @artist.name)
end
should "ban the post" do
assert_equal(true, @post.is_banned?)
artist = create(:artist)
implication = create(:tag_implication, antecedent_name: artist.name, consequent_name: "banned_artist")
post = create(:post, tag_string: artist.name)
assert_equal(true, post.is_banned?)
end
end