WIP: Fix "UpdateAllRemoteMirrorsWorker can fail if `project` is `nil`"
Specs created while working on #1165 (closed)
WIP Stream of consciousness (2016-10-26):
Deleted project should also destroy the RemoteMirror due to has_many :remote_mirrors, dependent: :destroy
. Updating the project_id to nil
some other way will trigger this, which isn't tested properly because the tests in RepositoryUpdateMirrorWorker
use project.id
instead of remote_mirror.id
. Looks like it also uses the mirror
trait in the projects factory instead of creating a mirror. Nope, it is maybe meant to use project id as that is used outside of tests too.
RepositoryUpdateMirrorWorker != RepositoryUpdateRemoteMirrorWorker