Sha256: d48a3e03c3a379f3a49a71018140d351769bafacc9dcda8bd870ac86a6cf4e7b
Contents?: true
Size: 594 Bytes
Versions: 6
Compression:
Stored size: 594 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_user(:as_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
6 entries across 6 versions & 2 rubygems