2017-09-10 17:25:29 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
feature 'User visits the notifications tab', :js do
|
2017-09-10 17:25:29 +05:30
|
|
|
let(:project) { create(:project) }
|
|
|
|
let(:user) { create(:user) }
|
|
|
|
|
|
|
|
before do
|
2018-03-17 18:26:18 +05:30
|
|
|
project.add_master(user)
|
2017-09-10 17:25:29 +05:30
|
|
|
sign_in(user)
|
|
|
|
visit(profile_notifications_path)
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'changes the project notifications setting' do
|
|
|
|
expect(page).to have_content('Notifications')
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
first('#notifications-button').click
|
2017-09-10 17:25:29 +05:30
|
|
|
click_link('On mention')
|
|
|
|
|
2018-03-27 19:54:05 +05:30
|
|
|
expect(page).to have_selector('#notifications-button', text: 'On mention')
|
2017-09-10 17:25:29 +05:30
|
|
|
end
|
|
|
|
end
|