summaryrefslogtreecommitdiff
path: root/spec/features/profiles
diff options
context:
space:
mode:
authorblackst0ne <blackst0ne.ru@gmail.com>2017-06-22 13:28:11 +1100
committerblackst0ne <blackst0ne.ru@gmail.com>2017-06-22 13:28:11 +1100
commitece7a3cfdcb0923831bc9ebd7aaf52a9763c1613 (patch)
treed80d833e2e9d9737daced0c2c00c1fb755b4b841 /spec/features/profiles
parent4b0b2f1525be5feac0ae0953eb573ff24cc7b9c5 (diff)
downloadgitlab-ce-ece7a3cfdcb0923831bc9ebd7aaf52a9763c1613.tar.gz
Replace 'profile/notifications.feature' spinach test with an rspec analog
Diffstat (limited to 'spec/features/profiles')
-rw-r--r--spec/features/profiles/user_visits_notifications_tab_spec.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/features/profiles/user_visits_notifications_tab_spec.rb b/spec/features/profiles/user_visits_notifications_tab_spec.rb
new file mode 100644
index 00000000000..e98cec79d87
--- /dev/null
+++ b/spec/features/profiles/user_visits_notifications_tab_spec.rb
@@ -0,0 +1,21 @@
+require 'spec_helper'
+
+feature 'User visits the notifications tab', js: true do
+ let(:project) { create(:empty_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