Skip to content

build_child/1 fails to build a valid struct #5

@ghost

Description

That is, the following test fails

  test "build_child/1" do
    comment = %Comment{id: 17, path: [89]}
    assert %Comment{id: nil, path: [89, 17]} = Comment.build_child(comment)
  end

with

  1) test build_child/1 (DemoTest)
     test/demo_test.exs:5
     match (=) failed
     code:  assert %Comment{id: nil, path: [89, 17]} = Comment.build_child(comment)
     right: %{__struct__: Demo.Comment, path: [89, 17]}
     stacktrace:
       test/demo_test.exs:7: (test)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions