Use separate resource for avatar url

pull/6827/head
Oliver Günther 7 years ago
parent 9bcfa1e72c
commit 30575290d9
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 2
      config/routes.rb
  2. 3
      spec/features/shared_avatar_examples.rb

@ -7,7 +7,7 @@ OpenProject::Application.routes.draw do
end
# Get the current avatar
get '/users/:id/avatar', controller: 'avatar', action: :show, as: 'user_avatar'
resources :avatars, controller: 'avatar', only: %i[show], as: 'user_avatar'
# Update another user's avatar
resources :users do

@ -83,8 +83,7 @@ shared_examples 'avatar management' do
find('.avatars--local-avatar-delete-link').click
page.driver.browser.switch_to.alert.accept
expect(page).to have_selector('.form--fieldset-legend', text: 'CUSTOM AVATAR')
expect(page).to have_selector('.avatars--current-local-avatar', text: 'none')
expect(page).to have_selector('.avatars--current-local-avatar', text: 'none', wait: 20)
end
end

Loading…
Cancel
Save