[Housekeeping] Improve test stability (#232)
* Ensured all tests use at least the DataCase module * addressed one flakey test * More flakey tests * Consolidated Mox usage
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
defmodule Pinchflat.FastIndexing.FastIndexingHelpersTest do
|
||||
use Pinchflat.DataCase
|
||||
|
||||
import Mox
|
||||
import Pinchflat.MediaFixtures
|
||||
import Pinchflat.SourcesFixtures
|
||||
import Pinchflat.ProfilesFixtures
|
||||
@@ -11,8 +10,6 @@ defmodule Pinchflat.FastIndexing.FastIndexingHelpersTest do
|
||||
alias Pinchflat.Downloading.MediaDownloadWorker
|
||||
alias Pinchflat.FastIndexing.FastIndexingHelpers
|
||||
|
||||
setup :verify_on_exit!
|
||||
|
||||
describe "kickoff_download_tasks_from_youtube_rss_feed/1" do
|
||||
setup do
|
||||
stub(YtDlpRunnerMock, :run, fn _url, _opts, _ot ->
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
defmodule Pinchflat.FastIndexing.FastIndexingWorkerTest do
|
||||
use Pinchflat.DataCase
|
||||
|
||||
import Mox
|
||||
import Pinchflat.SourcesFixtures
|
||||
|
||||
alias Pinchflat.Settings
|
||||
alias Pinchflat.Sources.Source
|
||||
alias Pinchflat.FastIndexing.FastIndexingWorker
|
||||
|
||||
setup :verify_on_exit!
|
||||
|
||||
describe "kickoff_with_task/2" do
|
||||
test "starts the worker" do
|
||||
source = source_fixture(fast_index: true)
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
defmodule Pinchflat.FastIndexing.YoutubeRssTest do
|
||||
use Pinchflat.DataCase
|
||||
import Mox
|
||||
|
||||
import Pinchflat.SourcesFixtures
|
||||
|
||||
alias Pinchflat.FastIndexing.YoutubeRss
|
||||
|
||||
setup :verify_on_exit!
|
||||
|
||||
setup do
|
||||
source = source_fixture()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user