Created
March 30, 2021 06:15
-
-
Save elfenlaid/c3c1b8dc3039f8a24a8bb3075a0b9d91 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule EctoMigrationTest do | |
use ExUnit.Case | |
def rollback, do: Mix.Shell.IO.cmd("MIX_ENV=test mix ecto.rollback --all") | |
def migrate, do: Mix.Shell.IO.cmd("MIX_ENV=test mix ecto.migrate") | |
test "test rollback and migration" do | |
assert 0 == rollback() | |
assert 0 == migrate() | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment