summaryrefslogtreecommitdiff
path: root/spec/features/profiles/user_visits_profile_spec.rb
blob: a5d8043914386bd6d1c4c693814c26826c205849 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require 'spec_helper'

describe 'User visits their profile' do
  let(:user) { create(:user) }

  before do
    sign_in(user)

    visit(profile_path)
  end

  it 'shows correct menu item' do
    expect(page).to have_active_navigation('Profile')
  end

  describe 'profile settings', :js do
    it 'saves updates' do
      fill_in 'user_bio', with: 'bio'
      click_button 'Update profile settings'

      expect(page).to have_content('Profile was successfully updated')
    end
  end
end