SysTime.Test (SysTime v0.1.0)

Copy Markdown View Source

Generates database drift tests for a temporal schema.

Summary

Functions

Generates ExUnit tests for a temporal schema's database installation.

Functions

drift_tests(schema, repo)

(macro)

Generates ExUnit tests for a temporal schema's database installation.

defmodule MyApp.SysTimeDriftTest do
  use ExUnit.Case, async: false
  import SysTime.Test

  drift_tests MyApp.Shareholder, MyApp.Repo
end

The generated tests verify positional column identity, history-schema fields, the primary-key overlap constraint, and all three ENABLE ALWAYS triggers.