Skip to content

Commit

Permalink
more test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdembe committed Jan 17, 2025
1 parent 64245bc commit 0a8ad18
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/presenters/account_show_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def connected_apps
def show_change_option
if requested_attributes
requested_attributes.include?('all_emails') ||
requested_attributes.include?('email')
!requested_attributes.include?('email')
end
end

Expand Down
2 changes: 1 addition & 1 deletion app/views/accounts/_connected_app.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
timestamp_html: render(TimeComponent.new(time: identity.created_at)),
) %>
<br />
<% if @presenter.show_change_option %>
<% if !@presenter.show_change_option %>
<strong>
<%= identity.email_address&.email || t('account.connected_apps.email_not_selected') %>
</strong>
Expand Down
4 changes: 2 additions & 2 deletions spec/views/accounts/connected_accounts/show.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@
end
let!(:identity) { create(:service_provider_identity, user:) }

it 'shows the change link' do
it 'hides the change link' do
render

expect(rendered).to have_link(
expect(rendered).to_not have_link(
t('help_text.requested_attributes.change_email_link'),
href: edit_connected_account_selected_email_path(identity_id: identity.id),
)
Expand Down

0 comments on commit 0a8ad18

Please sign in to comment.