eBooru/test/unit/post_pruner_test.rb
Earlopain fc7d84affd
[RuboCop] Enable Style/FrozenStringLiteralComment
This reduces allocations on the posts page by about 5%, from basic testing
2024-02-25 18:15:55 +01:00

19 lines
383 B
Ruby

# frozen_string_literal: true
require "test_helper"
class PostPrunerTest < ActiveSupport::TestCase
setup do
@user = create(:admin_user)
CurrentUser.user = @user
@old_post = create(:post, created_at: 31.days.ago, is_pending: true)
PostPruner.new.prune!
end
should "prune old pending posts" do
@old_post.reload
assert(@old_post.is_deleted?)
end
end