Skip to content

Commit

Permalink
attempt to reproduce
Browse files Browse the repository at this point in the history
  • Loading branch information
smn committed Jul 3, 2024
1 parent 156ab19 commit 5066655
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/expression_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,27 @@ defmodule ExpressionTest do
assert "bar" == Expression.evaluate_as_string!("@foo[1]", %{"foo" => ["baz", "bar"]})
end

test "risings problem" do
assert "hello" ==
Expression.evaluate_block!("content_units_response.body[current_activity]", %{
"content_units_response" => %{
"body" => ["hello", "bye"]
},
"current_activity" => 0
})

assert "hello" ==
Expression.evaluate_block!(
"content_units_response.body[current_activity]",
%{
"content_units_response" => %{
"body" => ["hello", "bye"]
},
"current_activity" => "0"
}
)
end

test "list with variable" do
assert "bar" =
Expression.evaluate_as_string!("@foo[cursor]", %{
Expand Down

0 comments on commit 5066655

Please sign in to comment.