0
0
Fork 0

Merge branch 'main' into glitch-soc/merge-upstream

This commit is contained in:
Claire 2021-03-24 10:53:50 +01:00
commit f60c99a8fb
53 changed files with 684 additions and 404 deletions

View file

@ -42,20 +42,6 @@ describe ApplicationController, type: :controller do
include_examples 'respond_with_error', 422
end
it "does not force ssl if Rails.env.production? is not 'true'" do
routes.draw { get 'success' => 'anonymous#success' }
allow(Rails.env).to receive(:production?).and_return(false)
get 'success'
expect(response).to have_http_status(200)
end
it "forces ssl if Rails.env.production? is 'true'" do
routes.draw { get 'success' => 'anonymous#success' }
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
it 'returns nil if not signed in' do
expect(controller.view_context.current_account).to be_nil