Sha256: 4ef225725627fe39a79599b1763583d773cb9dba11e3845e90e1dada1375c61f

Contents?: true

Size: 680 Bytes

Versions: 7

Compression:

Stored size: 680 Bytes

Contents

require 'spec_helper'
require 'stringio'

describe 'log note', type: :controller do

  class ApplicationController < ActionController::Base
  end

  controller do
    def index
      Rails.logger.error 'foo'
      Rails.logger.warn 'bar'
      render inline: '<html><head></head><body></body></html>', content_type: 'text/html'
    end
  end

  before :all do
    Footnotes.enabled = true
  end

  after :all do
    Footnotes.enabled = false
  end

  it 'Includes the log in the response' do
    get :index
    log_debug = first('fieldset#log_debug_info div', :visible => false)
    expect(log_debug).to have_content('foo')
    expect(log_debug).to have_content('bar')
  end

end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
rails-footnotes-7.1.0 spec/controllers/log_note_controller_spec.rb
rails-footnotes-7.0.1 spec/controllers/log_note_controller_spec.rb
rails-footnotes-7.0.0 spec/controllers/log_note_controller_spec.rb
rails-footnotes-5.0.0 spec/controllers/log_note_controller_spec.rb
rails6-footnotes-5.0.2 spec/controllers/log_note_controller_spec.rb
rails6-footnotes-5.0.1 spec/controllers/log_note_controller_spec.rb
rails6-footnotes-5.0.0 spec/controllers/log_note_controller_spec.rb