Skip to content

Commit b464709

Browse files
committed
update test types to match Ecto
1 parent 99e91c8 commit b464709

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

test/ecto_test/repo_test.exs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ defmodule Ecto.Integration.RepoTest do
2424
# PASSES
2525
test "supports unnamed repos" do
2626
assert {:ok, pid} = TestRepo.start_link(name: nil)
27-
assert Ecto.Repo.Queryable.all(pid, Post, []) == []
27+
assert Ecto.Repo.Queryable.all(pid, Post, Ecto.Repo.Supervisor.tuplet(pid, [])) == []
2828
end
2929

3030
# PASSES
@@ -1039,7 +1039,10 @@ defmodule Ecto.Integration.RepoTest do
10391039
}
10401040

10411041
assert {1, _} =
1042-
TestRepo.insert_all(Post, source, conflict_target: [:id], on_conflict: :replace_all)
1042+
TestRepo.insert_all(Post, source,
1043+
conflict_target: [:id],
1044+
on_conflict: :replace_all
1045+
)
10431046

10441047
expected_id = id + 1
10451048
expected_title = "A generic title suffix #{id}"

test/ecto_test/type_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ defmodule Ecto.Integration.TypeTest do
226226
end
227227

228228
test "uses default value" do
229-
{_, opts} = Ecto.Repo.Registry.lookup(TestRepo)
230-
Mongo.insert_one(opts.pid, "posts", %{title: "My Post"})
229+
%{pid: pid} = Ecto.Repo.Registry.lookup(TestRepo)
230+
Mongo.insert_one(pid, "posts", %{title: "My Post"})
231231

232232
post = TestRepo.all(Post) |> List.first()
233233
assert post.public == true

0 commit comments

Comments
 (0)