Add render method to notification item component
This commit is contained in:
15
spec/components/layout/notification_item_component_spec.rb
Normal file
15
spec/components/layout/notification_item_component_spec.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
require "rails_helper"
|
||||
|
||||
describe Layout::NotificationItemComponent do
|
||||
it "is not rendered for anonymous users" do
|
||||
render_inline Layout::NotificationItemComponent.new(nil)
|
||||
|
||||
expect(page).not_to be_rendered
|
||||
end
|
||||
|
||||
it "is rendered for identified users" do
|
||||
render_inline Layout::NotificationItemComponent.new(create(:user))
|
||||
|
||||
expect(page).to be_rendered
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user