       end
     end
 
+    # Move this to add_page
     test "must allow inline template" do
       inline_template = """
       <section class="sheet padding-10mm">

      assert html_report =~ "Inline template"
    end

    test "A4 portrait" do
      html_report =
        Rapport.new(@empty_template, :A4, :portrait)
        |> Rapport.generate_html

      assert html_report =~ "<style>@page {size: A4}</style>"
      assert html_report =~ "<body class=\"A4\">"
    end

    test "A4 landscape" do
      html_report =
        Rapport.new(@empty_template, :A4, :landscape)
        |> Rapport.generate_html

      assert html_report =~ "<style>@page {size: A4 landscape}</style>"
      assert html_report =~ "<body class=\"A4 landscape\">"
    end

    test "A3 portrait" do
      html_report =
        Rapport.new(@empty_template, :A3, :portrait)
        |> Rapport.generate_html

      assert html_report =~ "<style>@page {size: A3}</style>"
      assert html_report =~ "<body class=\"A3\">"
    end

    test "A3 landscape" do
      html_report =
        Rapport.new(@empty_template, :A3, :landscape)
        |> Rapport.generate_html

      assert html_report =~ "<style>@page {size: A3 landscape}</style>"
      assert html_report =~ "<body class=\"A3 landscape\">"
    end

    test "A5 portrait" do
      html_report =
        Rapport.new(@empty_template, :A5, :portrait)
        |> Rapport.generate_html

      assert html_report =~ "<style>@page {size: A5}</style>"
      assert html_report =~ "<body class=\"A5\">"
    end

    test "A5 landscape" do
      html_report =
        Rapport.new(@empty_template, :A5, :landscape)
        |> Rapport.generate_html

      assert html_report =~ "<style>@page {size: A5 landscape}</style>"
      assert html_report =~ "<body class=\"A5 landscape\">"
    end

    test "half_letter portrait" do
      html_report =
        Rapport.new(@empty_template, :half_letter, :portrait)
        |> Rapport.generate_html

      assert html_report =~ "<style>@page {size: half_letter}</style>"
      assert html_report =~ "<body class=\"half_letter\">"
    end

    test "half_letter landscape" do
      html_report =
        Rapport.new(@empty_template, :half_letter, :landscape)
        |> Rapport.generate_html

      assert html_report =~ "<style>@page {size: half_letter landscape}</style>"
      assert html_report =~ "<body class=\"half_letter landscape\">"
    end

    test "letter portrait" do
      html_report =
        Rapport.new(@empty_template, :letter, :portrait)
        |> Rapport.generate_html

      assert html_report =~ "<style>@page {size: letter}</style>"
      assert html_report =~ "<body class=\"letter\">"
    end

    test "letter landscape" do
      html_report =
        Rapport.new(@empty_template, :letter, :landscape)
        |> Rapport.generate_html

      assert html_report =~ "<style>@page {size: letter landscape}</style>"
      assert html_report =~ "<body class=\"letter landscape\">"
    end

    test "legal portrait" do
      html_report =
        Rapport.new(@empty_template, :legal, :portrait)
        |> Rapport.generate_html

      assert html_report =~ "<style>@page {size: legal}</style>"
      assert html_report =~ "<body class=\"legal\">"
    end

    test "legal landscape" do
      html_report =
        Rapport.new(@empty_template, :legal, :landscape)
        |> Rapport.generate_html

      assert html_report =~ "<style>@page {size: legal landscape}</style>"
      assert html_report =~ "<body class=\"legal landscape\">"
    end

    test "junior legal portrait" do
      html_report =
        Rapport.new(@empty_template, :junior_legal, :portrait)
        |> Rapport.generate_html

      assert html_report =~ "<style>@page {size: junior_legal}</style>"
      assert html_report =~ "<body class=\"junior_legal\">"
    end

    test "junior legal landscape" do
      html_report =
        Rapport.new(@empty_template, :junior_legal, :landscape)
        |> Rapport.generate_html

      assert html_report =~ "<style>@page {size: junior_legal landscape}</style>"
      assert html_report =~ "<body class=\"junior_legal landscape\">"
    end

    test "ledger portrait" do
      html_report =
        Rapport.new(@empty_template, :ledger, :portrait)
        |> Rapport.generate_html

      assert html_report =~ "<style>@page {size: ledger}</style>"
      assert html_report =~ "<body class=\"ledger\">"
    end

    test "ledger landscape" do
      html_report =
        Rapport.new(@empty_template, :ledger, :landscape)
        |> Rapport.generate_html

      assert html_report =~ "<style>@page {size: ledger landscape}</style>"
      assert html_report =~ "<body class=\"ledger landscape\">"
    end
  end


        |> Rapport.add_page(@hello_template, %{hello: "Hello world"})

      assert length(report.pages) == 1
      assert List.first(report.pages).fields.hello == "Hello world"
    end

    test "add two pages" do
