Fix UpdateWorker test mock to accept version argument
The update/1 function now receives a version argument, but the test mocks were still expecting update/0. Updated mock expectations to accept the version parameter. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
23381ed8d9
commit
00fff278b5
1 changed files with 2 additions and 2 deletions
|
|
@ -6,14 +6,14 @@ defmodule Pinchflat.YtDlp.UpdateWorkerTest do
|
|||
|
||||
describe "perform/1" do
|
||||
test "calls the yt-dlp runner to update yt-dlp" do
|
||||
expect(YtDlpRunnerMock, :update, fn -> {:ok, ""} end)
|
||||
expect(YtDlpRunnerMock, :update, fn _version -> {:ok, ""} end)
|
||||
expect(YtDlpRunnerMock, :version, fn -> {:ok, ""} end)
|
||||
|
||||
perform_job(UpdateWorker, %{})
|
||||
end
|
||||
|
||||
test "saves the new version to the database" do
|
||||
expect(YtDlpRunnerMock, :update, fn -> {:ok, ""} end)
|
||||
expect(YtDlpRunnerMock, :update, fn _version -> {:ok, ""} end)
|
||||
expect(YtDlpRunnerMock, :version, fn -> {:ok, "1.2.3"} end)
|
||||
|
||||
perform_job(UpdateWorker, %{})
|
||||
|
|
|
|||
Loading…
Reference in a new issue