Skip to content

Commit

Permalink
fixup add tests for move node validations
Browse files Browse the repository at this point in the history
  • Loading branch information
electronicbites committed Aug 9, 2024
1 parent 99b646c commit 5facf97
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
11 changes: 0 additions & 11 deletions lib/radiator/outline.ex
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,6 @@ defmodule Radiator.Outline do
{:error, :noop}
end

# # when node stays in the same level
# defp validate_consistency_for_move(
# %{parent_id: new_parent_id} = node,
# _new_prev_id,
# new_parent_id,
# _parent_node
# ) do
# require IEx; IEx.pry
# {:ok, node}
# end

# when prev is nil, every parent is allowed
defp validate_consistency_for_move(
node,
Expand Down
2 changes: 1 addition & 1 deletion test/radiator/outline_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ defmodule Radiator.OutlineTest do
Outline.move_node(node_1.uuid, node_5.uuid, node_1.uuid)
end

test "error when parent id a child of new node", %{
test "error when parent is a child of new node", %{
node_1: node_1,
node_5: node_5,
nested_node_1: nested_node_1
Expand Down

0 comments on commit 5facf97

Please sign in to comment.