Sha256: 55c36cda764182b7bca740ed33ecabaa25080051b77dac659d6dd5a048a9b2fc
Contents?: true
Size: 953 Bytes
Versions: 17
Compression:
Stored size: 953 Bytes
Contents
require 'spec_helper' describe 'Enable SSL admin' do before :each do FactoryGirl.create('existing site') FactoryGirl.create(:account) host!('models.example.com') Locomotive.config.enable_admin_ssl = true end it 'should redirect to SSL on admin when enabled' do get '/locomotive/pages' response.status.should == 302 response.location.should =~ /https/ end context 'admin ssl disabled' do before do Locomotive.config.enable_admin_ssl = false end it 'should not redirect to SSL on admin when disabled' do get '/locomotive/pages' response.status.should == 302 response.location.should =~ /http/ end end context 'request for the non main domain' do before do host!('myexample.com') end it 'should not redirect to SSL' do get '/locomotive/pages' response.status.should == 302 response.location.should =~ /http/ end end end
Version data entries
17 entries across 17 versions & 1 rubygems