File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,6 @@ def csv_export_attributes
4747 end
4848
4949 def register_on_partnerbase
50- UpdateDiaperPartnerJob . perform_async ( self . id )
50+ UpdateDiaperPartnerJob . perform_async ( id )
5151 end
5252end
Original file line number Diff line number Diff line change 5151 # end
5252 # end
5353 # end
54+
55+
56+ it 'fires send_email method as after_create method callbacks' do
57+ expect ( subject ) . to receive ( :register_on_partnerbase )
58+ subject . run_callbacks ( :create )
59+ end
60+
5461 describe "import_csv" do
55- let ( :organization ) { create ( :organization ) }
62+ let ( :organization ) { create ( :organization ) }
5663
5764 it "imports storage locations from a csv file" do
5865 before_import = Partner . count
6774 data = File . read ( import_file_path , encoding : "BOM|UTF-8" )
6875 expect do
6976 Partner . import_csv ( data , organization . id )
70- end . to change { Partner . count } . by ( 20 )
77+ end . to change { Partner . count } . by ( 20 )
7178 end
7279 end
7380end
You can’t perform that action at this time.
0 commit comments