     assert Map.drop(version, [:id]) == %{
       event: "update",
       item_type: "Company",
-      item_id: Repo.one(first(Company, :id)).id,
+      item_id: first_company.id,
       item_changes: %{city: "Hong Kong", website: "http://www.acme.com", facebook: "acme.llc"},
       origin: nil,
       originator_id: nil,

    assert Map.drop(version, [:id]) == %{
      event: "insert",
      item_type: "Company",
      item_id: Repo.one(first(Company, :id)).id,
      item_changes: Map.drop(result[:model], [:__meta__, :__struct__, :people]),
      origin: "test",
      originator_id: nil,

  end

  test "creating a company creates a company version with correct attributes" do
    {:ok, result} =
      %{name: "Acme LLC", is_active: true, city: "Greenwich", people: []}
      |> ChangesetHelper.new_company()
      |> PaperTrail.insert(origin: "test")

    company_count = QueryHelper.company_count() |> Repo.all()
    version_count = QueryHelper.version_count() |> Repo.all()
    first_company = QueryHelper.first_company() |> Repo.one()

    company = result[:model] |> Map.drop([:__meta__, :__struct__, :inserted_at, :updated_at, :id])
    version = result[:version] |> Map.drop([:__meta__, :__struct__, :inserted_at])

    assert company_count == [1]
