VRFS-1483 final cleanup
This commit is contained in:
parent
6834a05568
commit
e5d280e374
|
|
@ -9,14 +9,30 @@ ActiveAdmin.register JamRuby::EmailBatch, :as => 'Batch Emails' do
|
|||
|
||||
form :partial => 'form'
|
||||
|
||||
action_item do
|
||||
link_to('New Batch Email', new_admin_batch_email_path)
|
||||
action_item :only => [:show] do
|
||||
link_to('Edit Batch Email', edit_admin_batch_email_path(resource.id)) if resource.can_run_batch?
|
||||
end
|
||||
|
||||
action_item :only => [:show] do
|
||||
link_to("Test Batch (#{resource.test_count})",
|
||||
batch_test_admin_batch_email_path(resource.id),
|
||||
:confirm => "Run test batch with #{resource.test_count} emails?") if resource.can_run_test?
|
||||
end
|
||||
|
||||
action_item :only => [:show] do
|
||||
link_to("Deliver Batch (#{User.email_opt_in.count})",
|
||||
batch_send_admin_batch_email_path(resource.id),
|
||||
:confirm => "Run LIVE batch with #{User.email_opt_in.count} emails?") if resource.can_run_batch?
|
||||
end
|
||||
|
||||
action_item :only => [:show, :edit] do
|
||||
link_to('Clone Batch Email', batch_clone_admin_batch_email_path(resource.id))
|
||||
end
|
||||
|
||||
action_item do
|
||||
link_to('New Batch Email', new_admin_batch_email_path)
|
||||
end
|
||||
|
||||
index do
|
||||
column 'Subject' do |bb| bb.subject end
|
||||
column 'Created' do |bb| bb.created_at end
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@ describe BatchMailer do
|
|||
batch = FactoryGirl.create(:email_batch)
|
||||
batch.send_test_batch
|
||||
|
||||
batch.email_batch_sets.count.should == 1
|
||||
|
||||
mail = BatchMailer.deliveries.detect { |dd| dd['to'].to_s.split(',')[0] == batch.test_emails.split(',')[0]}
|
||||
# let (:mail) { BatchMailer.deliveries[0] }
|
||||
# it { mail['to'].to_s.split(',')[0].should == batch.test_emails.split(',')[0] }
|
||||
|
|
|
|||
Loading…
Reference in New Issue