tests: fix broken tests.
This commit is contained in:
@@ -161,7 +161,6 @@ class UsersControllerTest < ActionDispatch::IntegrationTest
|
|||||||
assert_redirected_to posts_path
|
assert_redirected_to posts_path
|
||||||
assert_equal(true, @user.reload.is_deleted?)
|
assert_equal(true, @user.reload.is_deleted?)
|
||||||
assert_equal("Your account has been deactivated", flash[:notice])
|
assert_equal("Your account has been deactivated", flash[:notice])
|
||||||
assert_nil(session[:user_id])
|
|
||||||
assert_equal(true, @user.user_events.user_deletion.exists?)
|
assert_equal(true, @user.user_events.user_deletion.exists?)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -383,13 +383,12 @@ class PostTest < ActiveSupport::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
context "with a banned artist" do
|
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
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user