mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-23 11:36:09 +10:00
Add admin notification unsubscribe feature
This commit is contained in:
@@ -7,4 +7,20 @@ class Spinach::Features::User < Spinach::FeatureSteps
|
||||
step 'I should see user "John Doe" page' do
|
||||
expect(page.title).to match(/^\s*John Doe/)
|
||||
end
|
||||
|
||||
step 'I visit unsubscribe link' do
|
||||
visit "/unsubscribes/joh@doe.org"
|
||||
end
|
||||
|
||||
step 'I should see unsubscribe text and button' do
|
||||
page.should have_content "Unsubscribe from Admin notifications Yes, I want to unsubscribe joh@doe.org from any further admin emails."
|
||||
end
|
||||
|
||||
step 'I press the unsubscribe button' do
|
||||
click_button("Unsubscribe")
|
||||
end
|
||||
|
||||
step 'I should be unsubscribed' do
|
||||
current_path.should == root_path
|
||||
end
|
||||
end
|
||||
|
||||
@@ -67,3 +67,10 @@ Feature: User
|
||||
And I should see project "Enterprise"
|
||||
And I should not see project "Internal"
|
||||
And I should not see project "Community"
|
||||
|
||||
Scenario: I unsubscribe from admin notifications
|
||||
Given I sign in as "John Doe"
|
||||
When I visit unsubscribe link
|
||||
Then I should see unsubscribe text and button
|
||||
And I press the unsubscribe button
|
||||
Then I should be unsubscribed
|
||||
|
||||
Reference in New Issue
Block a user