Sha256: 708a48f00306915c3de7f024d694c18952466b6b3b2e0d3337963f69d38265b9

Contents?: true

Size: 648 Bytes

Versions: 4

Compression:

Stored size: 648 Bytes

Contents

require_relative '../../spec_helper'

describe Authentication do
  let(:credentials){ {user: 'user', password: 'password'} }

  describe 'config' do
    it 'should inject authentication in server class' do
      Authentication.setup(credentials)
    end
  end

  describe 'authentication_required??' do
    it 'should return true if it has some credentials' do
      Authentication.setup(credentials)
      Authentication.authentication_required?.should eq(true)
    end

    it 'should return false if no credentials were provided' do
      Authentication.setup(nil)
      Authentication.authentication_required?.should eq(false)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
redis_monitor-0.3.3 lib/engine/spec/lib/security/authentication_spec.rb
redis_monitor-0.3.2 lib/engine/spec/lib/security/authentication_spec.rb
redis_monitor-0.3 lib/engine/spec/lib/security/authentication_spec.rb
redis_monitor-0.2.1 lib/engine/spec/lib/security/authentication_spec.rb