Sha256: fb57b0d930e3571f763b1506ad00fe8f69076f7bb4f693bc2aa7e8e59f77f514

Contents?: true

Size: 757 Bytes

Versions: 6

Compression:

Stored size: 757 Bytes

Contents

# encoding: UTF-8
require 'spec_helper'

module CASServer
end
require 'casserver/utils'

describe CASServer::Utils, '#log_controller_action(controller, params)' do
  let(:params) { {} }
  let(:params_with_password) { { 'password' => 'test' } }
  let(:params_with_password_filtered) { { 'password' => '******' } }

  it 'should log the controller action' do
    $LOG.should_receive(:debug).with 'Processing application::instance_eval {}'

    subject.log_controller_action('application', params)
  end

  it 'should filter password parameters in the log' do
    $LOG.should_receive(:debug).with "Processing application::instance_eval #{params_with_password_filtered.inspect}"

    subject.log_controller_action('application', params_with_password)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
synapse-rubycas-server-1.1.6 spec/casserver/utils_spec.rb
synapse-rubycas-server-1.1.5.pre spec/casserver/utils_spec.rb
synapse-rubycas-server-1.1.4.pre spec/casserver/utils_spec.rb
synapse-rubycas-server-1.1.4 spec/casserver/utils_spec.rb
synapse-rubycas-server-1.1.3alpha spec/casserver/utils_spec.rb
synapse-rubycas-server-1.1.3.pre spec/casserver/utils_spec.rb