Fix attribute locking namespace conflict, duplicate syncs

This commit is contained in:
Zach Gollwitzer
2025-05-19 16:39:31 -04:00
parent ab5bce3462
commit 137219c121
11 changed files with 87 additions and 28 deletions

View File

@@ -20,7 +20,7 @@ class AutoSyncTest < ActionDispatch::IntegrationTest
travel_to Time.current.beginning_of_day
last_sync_datetime = 1.hour.ago
Sync.create!(syncable: @family, created_at: last_sync_datetime)
Sync.create!(syncable: @family, created_at: last_sync_datetime, status: "completed")
assert_difference "Sync.count", 1 do
get root_path
@@ -32,7 +32,7 @@ class AutoSyncTest < ActionDispatch::IntegrationTest
last_created_sync_at = 23.hours.ago
Sync.create!(syncable: @family, created_at: last_created_sync_at)
Sync.create!(syncable: @family, created_at: last_created_sync_at, status: "completed")
assert_no_difference "Sync.count" do
get root_path