Sha256: f190ea4f22e19906e85192c9b35c978dcff274e628861834ccdc18143d5ad79f

Contents?: true

Size: 905 Bytes

Versions: 59

Compression:

Stored size: 905 Bytes

Contents

require "spec_helper"

describe "manage/reports/_print_report.html.erb" do
  it "displays the print button with the modal" do
    rows = nil

    assign(:rows, rows)
    render partial: "manage/reports/print_report", locals: { rows: rows }

    expect(rendered).to eq("")
  end

  it "displays the print button with the modal" do
    rows = mock()
    rows.stubs(:count).returns(50)
    rows.stubs(:total_count).returns(51)
    assign(:rows, rows)
    render partial: "manage/reports/print_report", locals: { rows: rows }

    expect(rendered).to have_selector("div#print_report_modal")
  end

  it "displays just the print button" do
    rows = mock()
    rows.stubs(:count).returns(50)
    rows.stubs(:total_count).returns(49)
    assign(:rows, rows)
    render partial: "manage/reports/print_report", locals: { rows: rows }

    expect(rendered).not_to have_selector("div#print_report_modal")
  end
end

Version data entries

59 entries across 59 versions & 1 rubygems

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