From 04f9b15e1664b61f7654892afedefc71f0b8e85b Mon Sep 17 00:00:00 2001 From: Alex Boyd Date: Wed, 6 Jan 2016 16:25:27 -0700 Subject: [PATCH] Turn International SMS back off by default Fixes CNVS-26271 Test plan: - Ensure that the International SMS feature flag is off by default - Ensure that you don't have the option to choose a country when adding an SMS phone number to your profile Change-Id: I8e536b4252256b4aae299b444511eab7771c3e11 Reviewed-on: https://gerrit.instructure.com/69825 Reviewed-by: Matthew Wheeler Tested-by: Jenkins QA-Review: Heath Hales Product-Review: Alex Boyd --- lib/feature.rb | 2 +- spec/models/message_spec.rb | 1 + spec/selenium/profile_spec.rb | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/feature.rb b/lib/feature.rb index f166427cb12..57243776336 100644 --- a/lib/feature.rb +++ b/lib/feature.rb @@ -387,7 +387,7 @@ END display_name: -> { I18n.t('International SMS') }, description: -> { I18n.t('Allows users with international phone numbers to receive text messages from Canvas.') }, applies_to: 'RootAccount', - state: 'on', + state: 'hidden', root_opt_in: true }, 'international_sms_from_recipient_country' => { diff --git a/spec/models/message_spec.rb b/spec/models/message_spec.rb index 1dd76d0ad21..058949b9296 100644 --- a/spec/models/message_spec.rb +++ b/spec/models/message_spec.rb @@ -267,6 +267,7 @@ describe Message do context 'SMS' do before :once do user_model + @user.account.enable_feature!(:international_sms) end before do diff --git a/spec/selenium/profile_spec.rb b/spec/selenium/profile_spec.rb index 03320454ebf..51315b54aae 100644 --- a/spec/selenium/profile_spec.rb +++ b/spec/selenium/profile_spec.rb @@ -80,6 +80,7 @@ describe "profile" do end it "should add a new email address on profile settings page" do + @user.account.enable_feature!(:international_sms) notification_model(:category => 'Grading') notification_policy_model(:notification_id => @notification.id) @@ -161,6 +162,7 @@ describe "profile" do end it "should add another contact method - sms" do + @user.account.enable_feature!(:international_sms) test_cell_number = '8017121011' get "/profile/settings" f('.add_contact_link').click