about summary refs log tree commit diff
path: root/spec/controllers
diff options
context:
space:
mode:
authorJenkins <jenkins@jenkins.ninjawedding.org>2018-01-07 15:17:13 +0000
committerJenkins <jenkins@jenkins.ninjawedding.org>2018-01-07 15:17:13 +0000
commitc2e1bfd9ae3f5fe65c4918a37143d48a2cc12bb3 (patch)
treeeb2c9fd328b985d7d388e4a6f9543e0a1180a9e8 /spec/controllers
parent5083311d64f427771609e444b87c0c39cb6f8ac2 (diff)
parent1d92b90be9f494d90a6f79f53be9cca68562867e (diff)
Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/application_controller_spec.rb20
1 files changed, 8 insertions, 12 deletions
diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb
index 6a54a78c5..51c0e3c70 100644
--- a/spec/controllers/application_controller_spec.rb
+++ b/spec/controllers/application_controller_spec.rb
@@ -47,22 +47,18 @@ describe ApplicationController, type: :controller do
     include_examples 'respond_with_error', 422
   end
 
-  it "does not force ssl if LOCAL_HTTPS is not 'true'" do
+  it "does not force ssl if Rails.env.production? is not 'true'" do
     routes.draw { get 'success' => 'anonymous#success' }
-    ClimateControl.modify LOCAL_HTTPS: '' do
-      allow(Rails.env).to receive(:production?).and_return(true)
-      get 'success'
-      expect(response).to have_http_status(:success)
-    end
+    allow(Rails.env).to receive(:production?).and_return(false)
+    get 'success'
+    expect(response).to have_http_status(:success)
   end
 
-  it "forces ssl if LOCAL_HTTPS is 'true'" do
+  it "forces ssl if Rails.env.production? is 'true'" do
     routes.draw { get 'success' => 'anonymous#success' }
-    ClimateControl.modify LOCAL_HTTPS: 'true' do
-      allow(Rails.env).to receive(:production?).and_return(true)
-      get 'success'
-      expect(response).to redirect_to('https://test.host/success')
-    end
+    allow(Rails.env).to receive(:production?).and_return(true)
+    get 'success'
+    expect(response).to redirect_to('https://test.host/success')
   end
 
   describe 'helper_method :current_account' do