Sha256: ecea5366acf1843fdbc32696d1a1ba96fa615159858e16d9440dfd4695f903f1

Contents?: true

Size: 892 Bytes

Versions: 11

Compression:

Stored size: 892 Bytes

Contents

require 'spec_helper'

module Alchemy
  class MyCustomUser
  end

  describe 'AuthAccessors' do
    describe '.user_class' do
      before do
        # prevent memoization
        Alchemy.class_variable_set('@@user_class', nil)
      end

      it "raises error if user_class_name is not a String" do
        Alchemy.user_class_name = MyCustomUser
        expect {Alchemy.user_class }.to raise_error
      end

      after do
        Alchemy.user_class_name = 'DummyUser'
      end
    end

    describe 'defaults' do
      it 'has default value for Alchemy.signup_path' do
        expect(Alchemy.signup_path).to eq('/signup')
      end

      it 'has default value for Alchemy.login_path' do
        expect(Alchemy.login_path).to eq('/login')
      end

      it 'has default value for Alchemy.logout_path' do
        expect(Alchemy.logout_path).to eq('/logout')
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
alchemy_cms-3.1.3 spec/libraries/auth_accessors_spec.rb
alchemy_cms-3.2.0.rc1 spec/libraries/auth_accessors_spec.rb
alchemy_cms-3.2.0.beta spec/libraries/auth_accessors_spec.rb
alchemy_cms-3.1.1 spec/libraries/auth_accessors_spec.rb
alchemy_cms-3.1.0 spec/libraries/auth_accessors_spec.rb
alchemy_cms-3.1.0.rc3 spec/libraries/auth_accessors_spec.rb
alchemy_cms-3.1.0.rc2 spec/libraries/auth_accessors_spec.rb
alchemy_cms-3.1.0.rc1 spec/libraries/auth_accessors_spec.rb
alchemy_cms-3.1.0.beta6 spec/libraries/auth_accessors_spec.rb
alchemy_cms-3.1.0.beta5 spec/libraries/auth_accessors_spec.rb
alchemy_cms-3.1.0.beta4 spec/libraries/auth_accessors_spec.rb