Sha256: 2f139dcd4b5f70fa48b5fd3e418f2bce485342748bc949c11ff4421e1de7673e
Contents?: true
Size: 921 Bytes
Versions: 10
Compression:
Stored size: 921 Bytes
Contents
require 'spec_helper' describe Maestrano::Connector::Rails::ConnectorLogger do subject { Maestrano::Connector::Rails::ConnectorLogger } describe 'self.log' do let(:organization) { create(:organization) } it 'calls rails.logger' do expect(Rails.logger).to receive(:info) subject.log('info', organization, 'msg') end it 'includes the organization uid and tenant' do expect(Rails.logger).to receive(:info).with("uid=\"#{organization.uid}\", org_uid=\"#{organization.org_uid}\", tenant=\"#{organization.tenant}\", message=\"msg\"") subject.log('info', organization, 'msg') end it 'includes extra params' do expect(Rails.logger).to receive(:info).with("uid=\"#{organization.uid}\", org_uid=\"#{organization.org_uid}\", tenant=\"#{organization.tenant}\", foo=\"bar\", message=\"msg\"") subject.log('info', organization, 'msg', foo: :bar) end end end
Version data entries
10 entries across 10 versions & 1 rubygems