spec: allow stubbing CCPreviewer URL

flag=none

Change-Id: I1641acbfb7b3861d81241ee1ec215d49e33fc9e8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/219919
Tested-by: Jenkins
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Putnam <jeremyp@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Anju Reddy <areddy@instructure.com>
This commit is contained in:
Anju Reddy 2019-12-08 16:04:07 -07:00
parent d435957320
commit 18d7d90991
1 changed files with 6 additions and 0 deletions

View File

@ -36,6 +36,12 @@ module Factories
)
end
def stub_common_cartridge_url
allow(Canvas::DynamicSettings).to receive(:find).with(any_args).and_call_original
allow(Canvas::DynamicSettings).to receive(:find).with("common_cartridge_viewer", default_ttl: 5.minutes).and_return
ActiveSupport::HashWithIndifferentAccess.new({"app-host":"http://common-cartridge-viewer.netlify.com/"})
end
def account_rcs_model(opts={})
@account = factory_with_protected_attributes(Account, valid_account_attributes.merge(opts))
end