Allow using table actions in different namespaces
This way we can reuse it in sections like SDGManagement and URLs will be automatically generated as expected.
This commit is contained in:
@@ -3,6 +3,10 @@ require "rails_helper"
|
||||
describe Admin::Roles::TableActionsComponent, type: :component do
|
||||
let(:user) { create(:user) }
|
||||
|
||||
before do
|
||||
allow(ViewComponent::Base).to receive(:test_controller).and_return("Admin::BaseController")
|
||||
end
|
||||
|
||||
it "renders link to add the role for new records" do
|
||||
render_inline Admin::Roles::TableActionsComponent.new(user.build_manager)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user