diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-18 02:16:23 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-18 02:16:23 +0200 |
| commit | d85c7998e5faa0da53514bae8cc2ccb9a9fe0cd3 (patch) | |
| tree | e29ebcdfa5361682f0dc73c928d8d35f0fc9533f /test/models | |
| parent | d41ee504caedbe858e24ab2a23c7a804454c64c8 (diff) | |
Teach the action log reader the Trash vocabulary
Sentences for trash (with the pre-trash path), restore_from_trash
(with the destination), and destroy (with the final path, read
from its flat create-symmetric key).
Diffstat (limited to 'test/models')
| -rw-r--r-- | test/models/helpers/node_actions_helper_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/models/helpers/node_actions_helper_test.rb b/test/models/helpers/node_actions_helper_test.rb index 5244c19..16c833b 100644 --- a/test/models/helpers/node_actions_helper_test.rb +++ b/test/models/helpers/node_actions_helper_test.rb | |||
| @@ -104,4 +104,14 @@ class NodeActionsHelperTest < ActionView::TestCase | |||
| 104 | assert_includes action_summary(e), "a/b" | 104 | assert_includes action_summary(e), "a/b" |
| 105 | assert_not action_details?(e) | 105 | assert_not action_details?(e) |
| 106 | end | 106 | end |
| 107 | |||
| 108 | test "trash, restore, and destroy render their paths" do | ||
| 109 | trash = entry("trash", { "path" => { "from" => "club/old", "to" => "trash/old" } }) | ||
| 110 | restore = entry("restore_from_trash", { "path" => { "from" => "trash/old", "to" => "club/new" } }) | ||
| 111 | doomed = entry("destroy", { "path" => "trash/old" }) | ||
| 112 | |||
| 113 | assert_includes action_summary(trash), "club/old" | ||
| 114 | assert_includes action_summary(restore), "club/new" | ||
| 115 | assert_includes action_summary(doomed), "trash/old" | ||
| 116 | end | ||
| 107 | end | 117 | end |
