diff --git a/spec/requests/users_controller_spec.rb b/spec/requests/users_controller_spec.rb index cb7a5a12f..607b066c0 100644 --- a/spec/requests/users_controller_spec.rb +++ b/spec/requests/users_controller_spec.rb @@ -255,7 +255,7 @@ RSpec.describe UsersController, type: :request do it "allows changing email but not dpo or key_contact" do user.reload - expect(user.email).to eq(new_email) + expect(user.unconfirmed_email).to eq(new_email) expect(user.is_data_protection_officer?).to be false expect(user.is_key_contact?).to be false end @@ -521,7 +521,7 @@ RSpec.describe UsersController, type: :request do it "allows changing email and dpo" do user.reload - expect(user.email).to eq(new_email) + expect(user.unconfirmed_email).to eq(new_email) expect(user.is_data_protection_officer?).to be true expect(user.is_key_contact?).to be true end @@ -568,7 +568,7 @@ RSpec.describe UsersController, type: :request do it "allows changing email, dpo, key_contact" do patch "/users/#{other_user.id}", headers: headers, params: params other_user.reload - expect(other_user.email).to eq(new_email) + expect(other_user.unconfirmed_email).to eq(new_email) expect(other_user.is_data_protection_officer?).to be true expect(other_user.is_key_contact?).to be true end @@ -922,7 +922,7 @@ RSpec.describe UsersController, type: :request do it "allows changing email and dpo" do user.reload - expect(user.email).to eq(new_email) + expect(user.unconfirmed_email).to eq(new_email) expect(user.is_data_protection_officer?).to be true expect(user.is_key_contact?).to be true end @@ -969,7 +969,7 @@ RSpec.describe UsersController, type: :request do it "allows changing email, dpo, key_contact" do patch "/users/#{other_user.id}", headers: headers, params: params other_user.reload - expect(other_user.email).to eq(new_email) + expect(other_user.unconfirmed_email).to eq(new_email) expect(other_user.is_data_protection_officer?).to be true expect(other_user.is_key_contact?).to be true end @@ -1026,7 +1026,7 @@ RSpec.describe UsersController, type: :request do it "allows changing email, dpo, key_contact" do patch "/users/#{other_user.id}", headers: headers, params: params other_user.reload - expect(other_user.email).to eq(new_email) + expect(other_user.unconfirmed_email).to eq(new_email) expect(other_user.is_data_protection_officer?).to be true expect(other_user.is_key_contact?).to be true end