We only want to render the account link and login items in the header. And we want only render the Multitenancy and Administrators sections in the admin sidebar. We include the administrators management so it's possible to give permissions to other users to manage tenants. In order to restrict access to other sections by typing the URL or following a link, we're only enabling the rest of the routes when we aren't in the multitenancy management mode.
12 lines
376 B
Ruby
12 lines
376 B
Ruby
require "rails_helper"
|
|
|
|
describe Layout::LoginItemsComponent do
|
|
it "does not show the my activity link when multitenancy_management_mode is enabled" do
|
|
allow(Rails.application.config).to receive(:multitenancy_management_mode).and_return(true)
|
|
|
|
render_inline Layout::LoginItemsComponent.new(create(:user))
|
|
|
|
expect(page).not_to have_content "My content"
|
|
end
|
|
end
|