bsky page scanning auditing

This commit is contained in:
Dylan Knutson
2025-08-12 21:56:05 +00:00
parent 2de7f85a99
commit 420a44a27d
18 changed files with 436 additions and 5 deletions

View File

@@ -143,6 +143,7 @@ RSpec.describe Domain::Bluesky::Job::ScanPostsJob do
user.reload
expect(user.scanned_posts_at).to be_present
expect(user.last_posts_scan_log_entry).to eq(@log_entries.first)
end
it "sets the first_seen_entry for posts" do
@@ -360,6 +361,14 @@ RSpec.describe Domain::Bluesky::Job::ScanPostsJob do
expect(post1.first_seen_entry).to eq(@log_entries[0])
expect(post2.first_seen_entry).to eq(@log_entries[1])
end
it "sets last_posts_scan_log_entry to the first HTTP request log entry" do
perform_now({ user: user })
user.reload
expect(user.last_posts_scan_log_entry).to be_present
expect(user.last_posts_scan_log_entry).to eq(@log_entries.first)
end
end
context "when rescanning user with existing posts but pending files" do

View File

@@ -60,6 +60,15 @@ RSpec.describe Domain::Bluesky::Job::ScanUserJob do
expect(user.description).to eq("A test user profile")
expect(user.scanned_profile_at).to be_present
expect(user.state).to eq("ok")
expect(user.last_scan_log_entry).to eq(@log_entries.first)
end
it "sets last_scan_log_entry to the HTTP response log entry" do
perform_now({ user: user })
user.reload
expect(user.last_scan_log_entry).to be_present
expect(user.last_scan_log_entry).to eq(@log_entries.first)
end
it "enqueues ScanPostsJob for posts scanning" do