expect(render).tohave_selector("p",text:"To create logs your organisation must state a data protection officer. They must sign the Data Sharing Agreement.")
expect(render).tohave_link(
"Contact helpdesk to assign a data protection officer",
expect(render).tohave_selector("p",text:"To create logs your organisation must state a data protection officer. They must sign the Data Sharing Agreement.")
end
end
end
end
end
@ -127,13 +132,9 @@ RSpec.describe DataProtectionConfirmationBannerComponent, type: :component do
organisation.users.where(is_dpo:true).destroy_all
organisation.users.where(is_dpo:true).destroy_all
end
end
it"displays the banner"do
it"doesn't display the banner"do
expect(component.display_banner?).toeq(true)
expect(component.display_banner?).toeq(false)
expect(render).tohave_link(
expect(render.content).tobe_empty
"Contact helpdesk to assign a data protection officer",
expect(render).tohave_selector("p",text:"To create logs your organisation must state a data protection officer. They must sign the Data Sharing Agreement.")