From 00fff278b52cd5bb651cc9431ecb53f3b870ffb1 Mon Sep 17 00:00:00 2001 From: Daniel Da Cunha Date: Sun, 18 Jan 2026 22:15:25 +0800 Subject: [PATCH] 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 --- test/pinchflat/yt_dlp/update_worker_test.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/pinchflat/yt_dlp/update_worker_test.exs b/test/pinchflat/yt_dlp/update_worker_test.exs index fed0510..817b9b4 100644 --- a/test/pinchflat/yt_dlp/update_worker_test.exs +++ b/test/pinchflat/yt_dlp/update_worker_test.exs @@ -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, %{})