Commit 52b7dcaa authored by Alex Buijs's avatar Alex Buijs

Add feature spec for product marketing emails setting

Test opting into marketing emails
parent 6dc228cb
...@@ -12,6 +12,14 @@ RSpec.describe 'User visits the notifications tab', :js do ...@@ -12,6 +12,14 @@ RSpec.describe 'User visits the notifications tab', :js do
visit(profile_notifications_path) visit(profile_notifications_path)
end end
it 'turns on the receive product marketing emails setting' do
expect(page).to have_content('Notifications')
expect do
check 'Receive product marketing emails'
end.to change { user.reload.email_opted_in }.to(true)
end
it 'changes the project notifications setting' do it 'changes the project notifications setting' do
expect(page).to have_content('Notifications') expect(page).to have_content('Notifications')
......
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