mirror of
https://github.com/wanderer-industries/wanderer
synced 2026-05-01 15:00:31 +00:00
24 lines
538 B
Elixir
24 lines
538 B
Elixir
defmodule WandererApp.Api.ActorWithMapTest do
|
|
use ExUnit.Case, async: false
|
|
|
|
alias WandererApp.Api.ActorWithMap
|
|
|
|
describe "new/2" do
|
|
test "creates struct with user and map" do
|
|
user = %{id: "user-123", name: "Test User"}
|
|
map = %{id: "map-456", name: "Test Map"}
|
|
|
|
actor = ActorWithMap.new(user, map)
|
|
|
|
assert actor.user == user
|
|
assert actor.map == map
|
|
end
|
|
|
|
test "enforces required keys" do
|
|
assert_raise ArgumentError, fn ->
|
|
struct!(ActorWithMap, %{})
|
|
end
|
|
end
|
|
end
|
|
end
|