Skip to content

Commit

Permalink
Remove unused test component; add test that verifies methods can star…
Browse files Browse the repository at this point in the history
…t with 'call' (but not 'call_')
  • Loading branch information
camertron committed Nov 3, 2023
1 parent b08274e commit 77e3b6c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 0 additions & 5 deletions test/sandbox/app/components/header_component.rb

This file was deleted.

10 changes: 9 additions & 1 deletion test/sandbox/test/slotable_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ def test_slot_with_content_shorthand
assert component.title.content?
end

def test_slot_names_can_not_start_with_call_
def test_slot_names_cannot_start_with_call_
assert_raises ViewComponent::InvalidSlotNameError do
Class.new(ViewComponent::Base) do
renders_one :call_out_title
Expand All @@ -733,4 +733,12 @@ def test_slot_names_can_not_start_with_call_
end
end
end

def test_slot_names_can_start_with_call
assert_nothing_raised do
Class.new(ViewComponent::Base) do
renders_one :callhome_et
end
end
end
end

0 comments on commit 77e3b6c

Please sign in to comment.