[Tests] Fix post expunge note/post update count test

This commit is contained in:
Donovan Daniels 2024-04-06 08:10:55 -05:00
parent 75fdab1c85
commit b2c4fffdb5
No known key found for this signature in database
GPG Key ID: 907D29CBFD6157BA
2 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@ class ArtistUrlsControllerTest < ActionDispatch::IntegrationTest
end
get artist_urls_path(search: {
artist: { name: "bkub", },
artist_name: "bkub",
url_matches: "*bkub*",
is_active: "false",
order: "created_at",

View File

@ -17,7 +17,7 @@ class PostTest < ActiveSupport::TestCase
context "Expunging a post" do
# That belonged in a museum!
setup do
@upload = UploadService.new(attributes_for(:jpg_upload)).start!
@upload = UploadService.new(attributes_for(:jpg_upload).merge({ uploader: @user })).start!
@post = @upload.post
FavoriteManager.add!(user: @post.uploader, post: @post)
end
@ -44,14 +44,14 @@ class PostTest < ActiveSupport::TestCase
end
end
should_eventually "decrement the user's note update count" do
should "decrement the user's note update count" do
create(:note, post: @post)
assert_difference(["@post.uploader.reload.note_update_count"], -1) do
@post.expunge!
end
end
should_eventually "decrement the user's post update count" do
should "decrement the user's post update count" do
assert_difference(["@post.uploader.reload.post_update_count"], -1) do
@post.expunge!
end