Commit b5342de5 authored by Marin Jankovski's avatar Marin Jankovski

Add admin notification unsubscribe feature

parent 93e2e302
...@@ -7,4 +7,20 @@ class Spinach::Features::User < Spinach::FeatureSteps ...@@ -7,4 +7,20 @@ class Spinach::Features::User < Spinach::FeatureSteps
step 'I should see user "John Doe" page' do step 'I should see user "John Doe" page' do
expect(page.title).to match(/^\s*John Doe/) expect(page.title).to match(/^\s*John Doe/)
end 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 end
...@@ -67,3 +67,10 @@ Feature: User ...@@ -67,3 +67,10 @@ Feature: User
And I should see project "Enterprise" And I should see project "Enterprise"
And I should not see project "Internal" And I should not see project "Internal"
And I should not see project "Community" 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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment