profile_spec.rb 656 B

123456789101112131415161718192021222324252627282930313233
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. describe 'Profile' do
  4. include ProfileStories
  5. subject { page }
  6. let(:local_domain) { ENV['LOCAL_DOMAIN'] }
  7. before do
  8. as_a_logged_in_user
  9. with_alice_as_local_user
  10. end
  11. it 'I can view Annes public account' do
  12. visit account_path('alice')
  13. expect(subject).to have_title("alice (@alice@#{local_domain})")
  14. end
  15. it 'I can change my account' do
  16. visit settings_profile_path
  17. fill_in 'Display name', with: 'Bob'
  18. fill_in 'Bio', with: 'Bob is silent'
  19. first('button[type=submit]').click
  20. expect(subject).to have_content 'Changes successfully saved!'
  21. end
  22. end