Commit 0566aa51 authored by Valery Sizov's avatar Valery Sizov

spinach fixes

parent 61e5f27f
......@@ -11,7 +11,7 @@ class UnsubscribesController < ApplicationController
@user = get_user
if @user
@user.admin_unsubscribe!
Notify.send_unsubscribed_notification(@user).deliver_later
Notify.send_unsubscribed_notification(@user.id).deliver_later
end
redirect_to new_user_session_path, notice: 'You have been unsubscribed'
end
......
......@@ -3,6 +3,17 @@
- @blank_container = true
.group-members-page
- if current_user && current_user.can?(:admin_group_member, @group)
.panel.panel-default
.panel-heading
Add new user to group
.panel-body
- if should_user_see_group_roles?(current_user, @group)
%p.light
Members of group have access to all group projects.
.new-group-member-holder
= render "new_group_member"
- if @group.ldap_synced?
.bs-callout.bs-callout-info
The members of this group are managed using LDAP and cannot be added, changed or removed here.
......
......@@ -4,6 +4,7 @@ class Spinach::Features::AdminEmail < Spinach::FeatureSteps
include SharedAdmin
step 'I submit form with email notification info' do
perform_enqueued_jobs do
ActionMailer::Base.deliveries = []
@email_text = "Your project has been moved."
@selected_group = Group.last
......@@ -28,6 +29,7 @@ class Spinach::Features::AdminEmail < Spinach::FeatureSteps
find('.btn-create').click
end
end
end
step 'I should see a notification email is begin sent' do
expect(find('.flash-notice')).to have_content 'Email sent'
......@@ -46,8 +48,10 @@ class Spinach::Features::AdminEmail < Spinach::FeatureSteps
end
step 'I click unsubscribe' do
perform_enqueued_jobs do
click_button 'Unsubscribe'
end
end
step 'I get redirected to the sign in path' do
expect(current_path).to eq root_path
......
......@@ -25,6 +25,7 @@ WebMock.allow_net_connect!
Spinach.hooks.before_run do
include RSpec::Mocks::ExampleMethods
include ActiveJob::TestHelper
RSpec::Mocks.setup
TestEnv.init(mailer: false)
TestLicense.init
......
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