defmodule Microwaveprop.Workers.PskrRecalibrationWorkerTest do
  use Microwaveprop.DataCase, async: true
  use Oban.Testing, repo: Microwaveprop.Repo

  alias Microwaveprop.Pskr.RecalibrationRun
  alias Microwaveprop.Repo
  alias Microwaveprop.Workers.PskrRecalibrationWorker

  test "perform/1 records a run row even when the corpus is empty" do
    assert :ok = perform_job(PskrRecalibrationWorker, %{})

    [run] = Repo.all(RecalibrationRun)
    assert run.status == "skipped_insufficient_data"
    assert run.sample_count == 0
  end
end
