Sha256: c51f8d9c9b558d20e95e0797c2b643a85999295abb1dcf945e061057dab3dfaf
Contents?: true
Size: 974 Bytes
Versions: 15
Compression:
Stored size: 974 Bytes
Contents
require 'spec_helper' describe "Security: " do before do Alchemy::Page.root.children.destroy_all Alchemy::User.delete_all end context "If no user is present" do it "render the signup view" do visit '/' current_path.should == '/admin/signup' end end context "If user is present" do before do create_admin_user end it "a visitor should not be able to signup" do visit '/admin/signup' within('#alchemy_greeting') { page.should_not have_content('have to signup') } end context "that is not logged in" do it "should see login-form" do visit '/admin/dashboard' current_path.should == '/admin/login' end end context "that is already logged in" do before do login_into_alchemy end it "should be redirected to dashboard" do visit '/admin/login' current_path.should == '/admin/dashboard' end end end end
Version data entries
15 entries across 15 versions & 1 rubygems