fix: misnamed method in root account id fixups
* Attachments used to be in its own migration, hence the fixup was named `run`, but then got moved into the main models migration and needed to be named `populate` refs INTEROP-6039 flag=none test plan * without this change, `DataFixup::PopulateRootAccountIdOnModels.run` will fail * with it, that will succeed Change-Id: Ief7fd19c39a98d1133c325be44538a88d9152ef4 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243936 Reviewed-by: Augusto Callejas <acallejas@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> QA-Review: Xander Moffatt <xmoffatt@instructure.com> Product-Review: Xander Moffatt <xmoffatt@instructure.com>
This commit is contained in:
parent
cde3ab1a05
commit
0544b68d1f
|
@ -21,7 +21,7 @@ module DataFixup::PopulateRootAccountIdOnAttachments
|
|||
# Since Attachments needs multiple passes, in order, they all happen here.
|
||||
# DataFixup::PopulateRootAccountIdOnModels triggers this fixup
|
||||
# as part of the `populate_overrides` call. Hopefully no comedy ensues.
|
||||
def self.run(min, max)
|
||||
def self.populate(min, max)
|
||||
|
||||
# First pass: do standard migration
|
||||
# Not inside of Attachment.find_ids_in_ranges since that is called inside of
|
||||
|
|
|
@ -20,7 +20,7 @@ require 'spec_helper'
|
|||
describe DataFixup::PopulateRootAccountIdOnAttachments do
|
||||
let(:account) { account_model }
|
||||
|
||||
describe('.run') do
|
||||
describe('.populate') do
|
||||
it 'updates the root_account_id' do
|
||||
attachment1 = attachment_model(context: account)
|
||||
attachment1.update_attributes!(root_account_id: nil)
|
||||
|
@ -30,7 +30,7 @@ describe DataFixup::PopulateRootAccountIdOnAttachments do
|
|||
expect(attachment1.reload.root_account_id).to be_nil
|
||||
expect(attachment2.reload.root_account_id).to be_nil
|
||||
|
||||
DataFixup::PopulateRootAccountIdOnAttachments.run(attachment1.id, attachment2.id)
|
||||
DataFixup::PopulateRootAccountIdOnAttachments.populate(attachment1.id, attachment2.id)
|
||||
|
||||
expect(attachment1.reload.root_account_id).to eq account.id
|
||||
expect(attachment2.reload.root_account_id).to eq account.id
|
||||
|
|
Loading…
Reference in New Issue