Allow additional links in table actions component

This way we'll be able to make these links consistent.
This commit is contained in:
Javi Martín
2020-06-12 19:23:25 +02:00
parent e3753b1ad9
commit fb23df2e5b
20 changed files with 131 additions and 116 deletions

View File

@@ -54,4 +54,15 @@ describe Admin::TableActionsComponent, type: :component do
expect(page).to have_css "a#edit_me"
end
it "allows custom content" do
render_inline Admin::TableActionsComponent.new(record) do
"<a href='/'>Main</a>".html_safe
end
expect(page).to have_css "a", count: 3
expect(page).to have_link "Main", href: "/"
expect(page).to have_link "Edit"
expect(page).to have_link "Delete"
end
end