mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
DEV: Fix flaky uploads:disable_secure_uploads spec (#18719)
This test flakes occassionally, possibly because of the arg ordering which we do not guarantee. In future if this keeps occurring we may want to try make expect_enqueued_with not care about argument orders or the order of arrays etc within those arguments.
This commit is contained in:
@ -209,13 +209,11 @@ RSpec.describe "tasks/uploads" do
|
|||||||
expect(post2.reload.baked_at).not_to eq_time(1.week.ago)
|
expect(post2.reload.baked_at).not_to eq_time(1.week.ago)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "updates the affected ACLs" do
|
it "updates the affected ACLs via the SyncAclsForUploads job" do
|
||||||
expect_enqueued_with(
|
invoke_task
|
||||||
job: :sync_acls_for_uploads,
|
expect(Jobs::SyncAclsForUploads.jobs.last["args"][0]["upload_ids"]).to match_array(
|
||||||
args: { upload_ids: [upload1.id, upload2.id, upload3.id, upload4.id] },
|
[upload1.id, upload2.id, upload3.id, upload4.id]
|
||||||
) do
|
)
|
||||||
invoke_task
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user