Skip to content

Commit af4dd33

Browse files
committed
Stricter testing for raised error messages
1 parent 4c5983b commit af4dd33

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎test/ecto/adapters/sqlite3/connection/cte_test.exs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ defmodule Ecto.Adapters.SQLite3.Connection.CteTest do
176176
|> plan()
177177

178178
assert_raise Ecto.QueryError,
179-
~r/join `:left_lateral` not supported by SQLite3/,
179+
~r/^join `:left_lateral` not supported by SQLite3/,
180180
fn ->
181181
all(query)
182182
end

‎test/ecto/adapters/sqlite3/connection/from_test.exs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ defmodule Ecto.Adapters.SQLite3.Connection.FromTest do
6262

6363
test "raises when selecting all fields without a schema" do
6464
assert_raise Ecto.QueryError,
65-
~r"SQLite3 does not support selecting all fields from \"posts\" without a schema",
65+
~r"^SQLite3 does not support selecting all fields from \"posts\" without a schema",
6666
fn ->
6767
all(from(p in "posts", select: p) |> plan())
6868
end

‎test/ecto/adapters/sqlite3/connection/join_test.exs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ defmodule Ecto.Adapters.SQLite3.Connection.JoinTest do
2929
end
3030

3131
test "join with hints are not supported" do
32-
assert_raise Ecto.QueryError, ~r/join hints are not supported by SQLite3/, fn ->
32+
assert_raise Ecto.QueryError, ~r/^join hints are not supported by SQLite3/, fn ->
3333
Schema
3434
|> join(:inner, [p], q in Schema2,
3535
hints: ["USE INDEX FOO", "USE INDEX BAR"],

0 commit comments

Comments
 (0)