Sha256: 89519ce95d54855e5350608e9f087c98f645d0dd96b0e19b77c82274760f0b95

Contents?: true

Size: 670 Bytes

Versions: 5

Compression:

Stored size: 670 Bytes

Contents

require 'spec_helper'

describe "Security: " do
  include Capybara::DSL
  
  before(:each) do
    User.delete_all
  end
  
  context "If no user is present" do
    it "render the signup view" do
      visit '/'
      within('#alchemy_greeting') { page.should have_content('have to signup') }
    end
  end
  
  context "If on or more users are present" do
    it "a visitor should not be able to signup" do
      @user = User.create({:login => 'foo', :email => 'foo@bar.com', :password => 's3cr3t', :password_confirmation => 's3cr3t'})
      visit '/admin/signup'
      within('#alchemy_greeting') { page.should_not have_content('have to signup') }
    end
  end
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alchemy_cms-2.0.rc3 spec/integration/security_spec.rb
alchemy_cms-2.0.rc2 spec/integration/security_spec.rb
alchemy_cms-2.0.rc1 spec/integration/security_spec.rb
alchemy_cms-2.0.pre5 spec/integration/security_spec.rb
alchemy_cms-2.0.pre4 spec/integration/security_spec.rb