Skip to content

Commit 3b26f02

Browse files
committed
test(data_table): update assertions for reused Input and NativeSelect
1 parent 78f88f1 commit 3b26f02

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

test/ruby_ui/data_table_test.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ def test_render_search
3737

3838
assert_match(/type="search"/, output)
3939
assert_match(/placeholder="Filter emails..."/, output)
40-
assert_match(/data-action="input->ruby-ui--data-table#search"/, output)
40+
assert_match(/input->ruby-ui--data-table#search/, output)
41+
assert_match(/data-ruby-ui--data-table-target="search"/, output)
4142
end
4243

4344
def test_render_sortable_header_without_direction
@@ -108,8 +109,9 @@ def test_render_per_page_selector
108109
end
109110

110111
assert_match(/Rows per page/, output)
111-
assert_match(/data-action="change->ruby-ui--data-table#changePerPage"/, output)
112-
assert_match(/<option value="20" selected/, output)
112+
assert_match(/change->ruby-ui--data-table#changePerPage/, output)
113+
assert_match(/data-ruby-ui--data-table-target="perPage"/, output)
114+
assert_match(/<option.*value="20".*selected/, output)
113115
end
114116

115117
def test_render_content_wrapper

0 commit comments

Comments
 (0)