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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user