-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update clear_db_each_test.exs
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
defmodule Teiserver.Common.ClearDbEachTest do | ||
@moduledoc """ | ||
Tests that the sandbox db is cleared after each test | ||
""" | ||
use Teiserver.DataCase, async: true | ||
|
||
test "Sandbox test 1" do | ||
name = "ClearDbEachTestUser" | ||
user = Teiserver.TeiserverTestLib.new_user(name) | ||
result = Teiserver.CacheUser.get_user_by_id(user.id) | ||
assert result[:name] == name | ||
end | ||
|
||
test "Sandbox test 2" do | ||
name = "ClearDbEachTestUser" | ||
user = Teiserver.TeiserverTestLib.new_user(name) | ||
result = Teiserver.CacheUser.get_user_by_id(user.id) | ||
assert result[:name] == name | ||
end | ||
end |