diff --git a/example/config/test.exs b/example/config/test.exs index 4b302d6c..95212c0a 100644 --- a/example/config/test.exs +++ b/example/config/test.exs @@ -6,4 +6,4 @@ config :example, Repo, password: "postgres", database: "paper_trail_example_test", hostname: "localhost", - pool: Ecto.Adapters.SQL.Sandbox + poolsize: 10 diff --git a/example/test/company_test.exs b/example/test/company_test.exs index c510b2f6..2e052312 100644 --- a/example/test/company_test.exs +++ b/example/test/company_test.exs @@ -4,14 +4,18 @@ defmodule CompanyTest do doctest Company - test "creating a company creates a company version with correct attributes" do + setup_all do + Repo.delete_all(Company) + Repo.delete_all(PaperTrail.Version) + :ok + end - # Mix.env |> inspect |> IO.puts + test "creating a company creates a company version with correct attributes" do new_company = Company.changeset(%Company{}, %{ name: "Acme LLC", is_active: true, city: "Greenwich" }) - persisted_company = PaperTrail.insert(new_company) + {:ok, persisted_company} = PaperTrail.insert(new_company) persisted_company |> inspect |> IO.puts @@ -21,8 +25,8 @@ defmodule CompanyTest do ) assert company_count == [1] + # assert Map. - # company |> inspect |> IO.puts end diff --git a/example/test/test_helper.exs b/example/test/test_helper.exs index 869559e7..4b8b2462 100644 --- a/example/test/test_helper.exs +++ b/example/test/test_helper.exs @@ -1 +1 @@ -ExUnit.start() +ExUnit.start diff --git a/mix.exs b/mix.exs index 3c77720e..d98c9e3b 100644 --- a/mix.exs +++ b/mix.exs @@ -30,7 +30,7 @@ defmodule PaperTrail.Mixfile do defp description do """ - PaperTrail lets you track and record all the changes in your database. + Track and record all the changes in your database with PaperTrail. """ end