query_many.exs (512B)
1 defmodule Ecto.Integration.QueryManyTest do 2 use Ecto.Integration.Case, async: true 3 4 alias Ecto.Integration.TestRepo 5 6 test "query_many!/4" do 7 results = TestRepo.query_many!("SELECT 1; SELECT 2;") 8 assert [%{rows: [[1]], num_rows: 1}, %{rows: [[2]], num_rows: 1}] = results 9 end 10 11 test "query_many!/4 with iodata" do 12 results = TestRepo.query_many!(["SELECT", ?\s, ?1, ";", ?\s, "SELECT", ?\s, ?2, ";"]) 13 assert [%{rows: [[1]], num_rows: 1}, %{rows: [[2]], num_rows: 1}] = results 14 end 15 end