Skip to content

Commit 42d1232

Browse files
committed
Rubocop fixes
1 parent b647119 commit 42d1232

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

app/models/partner.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
5252
end

spec/models/partner_spec.rb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,15 @@
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
@@ -67,7 +74,7 @@
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
7380
end

0 commit comments

Comments
 (0)