master
Eugen Rochko 8 years ago
parent 3f075c7794
commit 83ccdeb87a
  1. 2
      app/services/send_push_notification_service.rb
  2. 6
      spec/spec_helper.rb

@ -23,6 +23,6 @@ class SendPushNotificationService < BaseService
end end
def remove_bad_ids(bad_ids) def remove_bad_ids(bad_ids)
Device.where(registration_id: bad_ids).delete_all Device.where(registration_id: bad_ids).delete_all unless bad_ids.empty?
end end
end end

@ -13,7 +13,11 @@ RSpec.configure do |config|
mocks.verify_partial_doubles = true mocks.verify_partial_doubles = true
end end
config.after(:suite) do config.before :each do
stub_request(:post, 'https://fcm.googleapis.com/fcm/send').to_return(status: 200, body: '')
end
config.after :suite do
FileUtils.rm_rf(Dir["#{Rails.root}/spec/test_files/"]) FileUtils.rm_rf(Dir["#{Rails.root}/spec/test_files/"])
end end
end end

Loading…
Cancel
Save