Skip to content

Commit 7a213ac

Browse files
format test/**/*.exs
1 parent 5524177 commit 7a213ac

8 files changed

Lines changed: 2914 additions & 1654 deletions

File tree

test/ecto/adapters/myxql_test.exs

Lines changed: 934 additions & 536 deletions
Large diffs are not rendered by default.

test/ecto/adapters/postgres_test.exs

Lines changed: 1330 additions & 734 deletions
Large diffs are not rendered by default.

test/ecto/adapters/tds_test.exs

Lines changed: 137 additions & 73 deletions
Large diffs are not rendered by default.

test/ecto/migration_test.exs

Lines changed: 224 additions & 102 deletions
Large diffs are not rendered by default.

test/ecto/migrator_repo_test.exs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ defmodule Ecto.MigratorRepoTest do
3636
use Ecto.Repo, otp_app: :ecto_sql, adapter: EctoSQL.TestAdapter
3737
end
3838

39-
Application.put_env(:ecto_sql, MainRepo, [migration_repo: MigrationRepo])
39+
Application.put_env(:ecto_sql, MainRepo, migration_repo: MigrationRepo)
4040

4141
setup do
4242
{:ok, _} = start_supervised({MigrationsAgent, [{1, nil}, {2, nil}, {3, nil}]})
@@ -46,9 +46,9 @@ defmodule Ecto.MigratorRepoTest do
4646
def put_test_adapter_config(config) do
4747
Application.put_env(:ecto_sql, EctoSQL.TestAdapter, config)
4848

49-
on_exit fn ->
49+
on_exit(fn ->
5050
Application.delete_env(:ecto, EctoSQL.TestAdapter)
51-
end
51+
end)
5252
end
5353

5454
setup_all do
@@ -60,7 +60,9 @@ defmodule Ecto.MigratorRepoTest do
6060
describe "migration_repo option" do
6161
test "upwards and downwards migrations" do
6262
assert run(MainRepo, [{3, ChangeMigration}, {4, Migration}], :up, to: 4, log: false) == [4]
63-
assert run(MainRepo, [{2, ChangeMigration}, {3, Migration}], :down, all: true, log: false) == [3, 2]
63+
64+
assert run(MainRepo, [{2, ChangeMigration}, {3, Migration}], :down, all: true, log: false) ==
65+
[3, 2]
6466
end
6567

6668
test "down invokes the repository adapter with down commands" do
@@ -74,13 +76,13 @@ defmodule Ecto.MigratorRepoTest do
7476
end
7577

7678
test "migrations run inside a transaction if the adapter supports ddl transactions when configuring a migration repo" do
77-
capture_log fn ->
79+
capture_log(fn ->
7880
put_test_adapter_config(supports_ddl_transaction?: true, test_process: self())
7981
up(MainRepo, 0, Migration)
8082

8183
assert_receive {:transaction, %{repo: MainRepo}, _}
8284
assert_receive {:lock_for_migrations, %{repo: MigrationRepo}, _, _}
83-
end
85+
end)
8486
end
8587
end
8688
end

0 commit comments

Comments
 (0)