spec: add logic to only turn on new_UI for root_account specs

Test Plan:
- Specs should pass
- Code review

Change-Id: I1d20f525a6cea33a30b3eb47fc7f6c54e1f17fc2
Reviewed-on: https://gerrit.instructure.com/73779
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins
This commit is contained in:
MFairbourn 2016-03-04 12:35:27 -07:00 committed by Matt Fairbourn
parent 64b2a62dc2
commit 798fc42115
1 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ def account_model(opts={})
@account = factory_with_protected_attributes(Account, valid_account_attributes.merge(opts))
# have New UI turned on by default on the canvas-sel-r21-hourly-p2-new-styles jenkins build
@account.enable_feature!(:use_new_styles) if ENV['CANVAS_FORCE_USE_NEW_STYLES']
@account.enable_feature!(:use_new_styles) if ENV['CANVAS_FORCE_USE_NEW_STYLES'] && @account.root_account?
@account
end
@ -35,7 +35,7 @@ def account_with_cas(opts={})
@account ||= Account.create!
# have New UI turned on by default on the canvas-sel-r21-hourly-p2-new-styles jenkins build
@account.enable_feature!(:use_new_styles) if ENV['CANVAS_FORCE_USE_NEW_STYLES']
@account.enable_feature!(:use_new_styles) if ENV['CANVAS_FORCE_USE_NEW_STYLES'] && @account.root_account?
config = AccountAuthorizationConfig::CAS.new
cas_url = opts[:cas_url] || "https://localhost/cas"
@ -52,7 +52,7 @@ def account_with_saml(opts={})
@account ||= Account.create!
# have New UI turned on by default on the canvas-sel-r21-hourly-p2-new-styles jenkins build
@account.enable_feature!(:use_new_styles) if ENV['CANVAS_FORCE_USE_NEW_STYLES']
@account.enable_feature!(:use_new_styles) if ENV['CANVAS_FORCE_USE_NEW_STYLES'] && @account.root_account?
config = AccountAuthorizationConfig::SAML.new
config.idp_entity_id = "saml_entity"