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.8.8 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.8.7 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.8.6 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.8.5 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.8.4 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.8.3 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.8.2 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.8.1 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.7.1 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.7.0 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.6.1 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.6.0 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.5.0 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.4.4 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.4.3 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.4.2 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.4.1 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.4.0 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.3.2 test/helpers/clark_kent/reports_helper_spec.rb
clark_kent-0.3.1 test/helpers/clark_kent/reports_helper_spec.rb