@ -32,6 +36,7 @@ RSpec.describe DataProtectionConfirmationBannerComponent, type: :component do
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_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
context"when org has a DPO"do
context"when org has a DPO"do
context"when org does not have a signed data sharing agreement"do
context"when org does not have a signed data sharing agreement"do
@ -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.")