Refactor modules into contexts (#78)
* [WIP] break out a few contexts, start refactoring fast index modules * [WIP] more contexts, this time around slow indexing and downloads * [WIP] got all tests passing * [WIP] Added moduledocs * Built a genserver to rename old jobs on boot * Added a module naming check; moved things around * Fixed specs
This commit is contained in:
@@ -7,12 +7,12 @@ defmodule Pinchflat.SourcesTest do
|
||||
import Pinchflat.SourcesFixtures
|
||||
|
||||
alias Pinchflat.Sources
|
||||
alias Pinchflat.Tasks.SourceTasks
|
||||
alias Pinchflat.Sources.Source
|
||||
alias Pinchflat.Workers.FastIndexingWorker
|
||||
alias Pinchflat.Workers.MediaDownloadWorker
|
||||
alias Pinchflat.Workers.MediaIndexingWorker
|
||||
alias Pinchflat.Workers.MediaCollectionIndexingWorker
|
||||
alias Pinchflat.Downloading.DownloadingHelpers
|
||||
alias Pinchflat.FastIndexing.FastIndexingWorker
|
||||
alias Pinchflat.Downloading.MediaDownloadWorker
|
||||
alias Pinchflat.FastIndexing.MediaIndexingWorker
|
||||
alias Pinchflat.SlowIndexing.MediaCollectionIndexingWorker
|
||||
|
||||
@invalid_source_attrs %{name: nil, collection_id: nil}
|
||||
|
||||
@@ -331,7 +331,7 @@ defmodule Pinchflat.SourcesTest do
|
||||
source = source_fixture(download_media: true)
|
||||
media_item = media_item_fixture(source_id: source.id, media_filepath: nil)
|
||||
update_attrs = %{download_media: false}
|
||||
SourceTasks.enqueue_pending_media_tasks(source)
|
||||
DownloadingHelpers.enqueue_pending_download_tasks(source)
|
||||
|
||||
assert_enqueued(worker: MediaDownloadWorker, args: %{"id" => media_item.id})
|
||||
assert {:ok, %Source{}} = Sources.update_source(source, update_attrs)
|
||||
|
||||
Reference in New Issue
Block a user