diff --git a/spec/requests/application_controller_spec.rb b/spec/requests/application_controller_spec.rb new file mode 100644 index 00000000000..2896d6e22e8 --- /dev/null +++ b/spec/requests/application_controller_spec.rb @@ -0,0 +1,17 @@ +require 'rails_helper' + +RSpec.describe ApplicationController do + describe '#redirect_to_login_if_required' do + let(:admin) { Fabricate(:admin) } + + before do + admin # to skip welcome wizard at home page `/` + SiteSetting.login_required = true + end + + it "should carry-forward authComplete param to login page redirect" do + get "/?authComplete=true" + expect(response).to redirect_to('/login?authComplete=true') + end + end +end