From e6fc279a89298a730bd47835f504d96e0bc301f9 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Fri, 1 Apr 2022 14:58:42 +0100 Subject: [PATCH] Spec setting data protection officer status --- spec/models/user_spec.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 275bb540c..ec0ffe4fb 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -51,13 +51,18 @@ RSpec.describe User, type: :model do expect(user.is_key_contact?).to be false end + it "can be set to key contact" do + expect { user.is_key_contact! } + .to change { user.reload.is_key_contact? }.from(false).to(true) + end + it "is not a data protection officer by default" do expect(user.is_data_protection_officer?).to be false end - it "can be set to key contact" do - expect { user.is_key_contact! } - .to change { user.reload.is_key_contact? }.from(false).to(true) + it "can be set to data protection officer" do + expect { user.is_data_protection_officer! } + .to change { user.reload.is_data_protection_officer? }.from(false).to(true) end end