Sha256: 23bcd5d4c7cd496426f5a05e0f50f8338b2eec04e8547d899381c0984843f315
Contents?: true
Size: 628 Bytes
Versions: 10
Compression:
Stored size: 628 Bytes
Contents
require 'spec_helper' describe "Security." do context "If user is not logged in" do it "should see login form" do visit '/admin/dashboard' expect(current_path).to eq(Alchemy.login_path) end end context "If ssl is enforced" do before do allow_any_instance_of(Alchemy::BaseController) .to receive(:ssl_required?) .and_return(true) authorize_as_admin(DummyUser.new(alchemy_roles: %w(admin))) end it "redirects every request to https." do visit '/admin/dashboard' expect(current_url).to eq('https://www.example.com/admin/dashboard') end end end
Version data entries
10 entries across 10 versions & 1 rubygems