Skip to content

Commit

Permalink
Refactor produce macro test
Browse files Browse the repository at this point in the history
  • Loading branch information
fuelen committed Jun 6, 2023
1 parent 3ce59f3 commit ae7124e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/seed_factory/test_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@ defmodule SeedFactory.TestTest do
use ExUnit.Case, async: true
use SeedFactory.Test, schema: SchemaExample

describe "produce macro" do
describe "produce macro check 1" do
produce :org
produce [:user, :project]

test "check 1", context do
test "check", context do
for key <- [:org, :user, :project, :office] do
assert Map.has_key?(context, key)
end
end
end

describe "produce macro check 2" do
produce org: :org1
produce org: :org2

test "check 2", context do
test "check", context do
assert Map.has_key?(context, :org1)
assert Map.has_key?(context, :org2)
end
Expand Down

0 comments on commit ae7124e

Please sign in to comment.