@ -31,7 +31,7 @@
:id,
:name,
inline: true,
legend: { text: "Are they a data protection officer?", size: "m" }
legend: { text: "Are #{current_user == @user ? "you" : "they"} a data protection officer?", size: "m" }
%>
<%= f.govuk_submit "Save changes" %>
@ -36,7 +36,7 @@
<%= f.govuk_submit "Continue" %>
@ -48,7 +48,7 @@
<%= summary_list.row do |row|
row.key { 'Data protection officer' }
row.value { @user.is_data_protection_officer? ? "Yes" : "No" }
row.action(visually_hidden_text: 'are they a data protection officer?', href: edit_user_path, html_attributes: { 'data-qa': 'change-are-they-a-data-protection-officer' })
row.action(visually_hidden_text: "are #{current_user == @user ? "you" : "they"} a data protection officer?", href: edit_user_path, html_attributes: { "data-qa": "change-are-#{current_user == @user ? "you" : "they"}-a-data-protection-officer" })
end %>
<% end %>
</div>
@ -245,7 +245,7 @@ RSpec.describe "User Features" do
choose("user-is-dpo-true-field")
click_button("Continue")
expect(
User.find_by(name: "New User", email: "newuser@example.com", role: "data_provider", is_dpo: true)
User.find_by(name: "New User", email: "newuser@example.com", role: "data_provider", is_dpo: true),
).to be_a(User)
end