This way it will be easier to change the behavior of all table actions, like adding ARIA attributes. In the past, when we changed the behavior of the `link_to` method, we had to change all table action classes.
10 lines
232 B
Ruby
10 lines
232 B
Ruby
require "rails_helper"
|
|
|
|
describe Admin::ActionComponent do
|
|
it "includes an HTML class for the action" do
|
|
render_inline Admin::ActionComponent.new(:edit, double, path: "/")
|
|
|
|
expect(page).to have_css "a.edit-link"
|
|
end
|
|
end
|