VRFS-4037 - fix mailing problemg
This commit is contained in:
parent
e27a3130c1
commit
5479e27216
|
|
@ -0,0 +1,20 @@
|
|||
ActiveAdmin.register JamRuby::User, :as => 'SchoolInterest' do
|
||||
|
||||
menu :label => 'Interested in Schools', :parent => 'JamClass'
|
||||
|
||||
config.sort_order = 'created_at desc'
|
||||
config.batch_actions = false
|
||||
config.per_page = 100
|
||||
config.paginate = true
|
||||
config.filters = false
|
||||
|
||||
scope("All", default: true) { |scope| scope.where(school_interest: true) }
|
||||
|
||||
index do
|
||||
column "Name" do |user|
|
||||
span do
|
||||
link_to "#{user.name} (#{user.email})", "#{Rails.application.config.external_root_url}/client#/profile/#{user.id}"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -1334,7 +1334,7 @@ module JamRuby
|
|||
end
|
||||
|
||||
if user.school_interest
|
||||
AdminMailer.partner({body: "#{user.email} signed up via the /landing/jamclass/schools page.", subject: "#{user.email} is interested in schools"})
|
||||
AdminMailer.partner({body: "#{user.email} signed up via the https://www.jamkazam.com/landing/jamclass/schools page.\n\nFull list is here: https://www.jamkazam.com/admin/admin/school_interests", subject: "#{user.email} is interested in schools"}).deliver
|
||||
end
|
||||
|
||||
if !user.email_confirmed
|
||||
|
|
|
|||
|
|
@ -13,6 +13,10 @@ describe "School Landing", :js => true, :type => :feature, :capybara_feature =>
|
|||
end
|
||||
|
||||
|
||||
before(:each) do
|
||||
AdminMailer.deliveries.clear
|
||||
end
|
||||
|
||||
let(:user) { FactoryGirl.create(:user, country: 'US') }
|
||||
|
||||
|
||||
|
|
@ -35,6 +39,8 @@ describe "School Landing", :js => true, :type => :feature, :capybara_feature =>
|
|||
# this should show on the /client#/home page (WILL CHANGE)
|
||||
find('h2', text: 'sessions')
|
||||
|
||||
AdminMailer.deliveries.count.should eql 3 # welcome email, partners ping about new user, and
|
||||
|
||||
user = User.find_by_email('school_interest_123@jamkazam.com')
|
||||
user.is_a_student.should be false
|
||||
user.is_a_teacher.should be false
|
||||
|
|
|
|||
Loading…
Reference in New Issue