Allow different texts in links to actions

The texts were different for a few models, so the component needs to be
updated.
This commit is contained in:
Javi Martín
2020-06-09 16:51:02 +02:00
parent 10c095d821
commit 738646a565
13 changed files with 73 additions and 56 deletions

View File

@@ -26,4 +26,13 @@ describe Admin::TableActionsComponent, type: :component do
expect(page).not_to have_link "Edit"
end
end
it "allows custom texts for actions" do
render_inline Admin::TableActionsComponent.new(record, edit_text: "change", destroy_text: "annihilate")
expect(page).to have_link "annihilate"
expect(page).to have_link "change"
expect(page).not_to have_link "Delete"
expect(page).not_to have_link "Edit"
end
end