Sha256: 2a5a221abf7902b28f7727ad0620eb74cb6d925543edb29668c724c01bfba5dd

Contents?: true

Size: 590 Bytes

Versions: 59

Compression:

Stored size: 590 Bytes

Contents

require 'spec_helper'
require 'cgi'

describe Manage::ReportsHelper do

  describe '#print_button' do

    let(:js_close_modal) { "$('#print_report_modal').modal('hide');" }

    it 'returns nil if there are rows are nil' do
      expect(print_button(nil)).to be_nil
    end

    it 'returns a print button without modal close js' do
      rows = mock()

      expect(print_button(rows)).not_to include(js_close_modal)
    end

    it 'returns a print button without modal close js' do
      rows = mock()

      expect(print_button(rows, true)).to include(js_close_modal)
    end
  end
end

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
clark_kent-0.11.3 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.11.2 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.11.1 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.11.0 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.10.4 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.10.2 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.10.1 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.10.0 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.9.9 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.9.8 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.9.7 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.9.6 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.9.5 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.9.4 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.9.2 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.9.1 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.9.0 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.8.11 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.8.10 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.8.9 test/helpers/clark_kent/reports_helper_spec.rb