Allow custom URLs in links to actions

There were a couple of cases where these links didn't point to the
default actions.
This commit is contained in:
Javi Martín
2020-06-09 17:20:00 +02:00
parent 738646a565
commit b1f9ca4ad5
13 changed files with 53 additions and 48 deletions

View File

@@ -35,4 +35,11 @@ describe Admin::TableActionsComponent, type: :component do
expect(page).not_to have_link "Delete"
expect(page).not_to have_link "Edit"
end
it "allows custom URLs" do
render_inline Admin::TableActionsComponent.new(edit_path: "/myedit", destroy_path: "/mydestroy")
expect(page).to have_link "Edit", href: "/myedit"
expect(page).to have_link "Delete", href: "/mydestroy"
end
end