Browse Source

Changing email requires reconfirming

pull/580/head
baarkerlounger 3 years ago
parent
commit
3b24380f7e
  1. 12
      spec/requests/users_controller_spec.rb

12
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

Loading…
Cancel
Save