pinchflat/test/pinchflat/boot/post_boot_startup_tasks_test.exs
Kieran 6ead29182d
[Enhancement] Auto-update yt-dlp (#589)
* Added a command for updating yt-dlp

* Added a yt-dlp update worker to run daily

* Added a new file that runs post-boot when the app is ready to serve requests; put yt-dlp updater in there

* Updated config to expose the current env globally; updated startup tasks to not run in test env

* Removes unneeded test code
2025-01-27 11:33:38 -08:00

16 lines
402 B
Elixir

defmodule Pinchflat.Boot.PostBootStartupTasksTest do
use Pinchflat.DataCase
alias Pinchflat.YtDlp.UpdateWorker
alias Pinchflat.Boot.PostBootStartupTasks
describe "update_yt_dlp" do
test "enqueues an update job" do
assert [] = all_enqueued(worker: UpdateWorker)
PostBootStartupTasks.init(%{})
assert [%Oban.Job{}] = all_enqueued(worker: UpdateWorker)
end
end
end