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

feature 'User visits the notifications tab', :js do
  let(:project) { create(:project) }
  let(:user) { create(:user) }

  before do
    project.team << [user, :master]
    sign_in(user)
    visit(profile_notifications_path)
  end

  it 'changes the project notifications setting' do
    expect(page).to have_content('Notifications')

    first('#notifications-button').trigger('click')
    click_link('On mention')

    expect(page).to have_content('On mention')
  end
end