diaspora/spec/workers/recurring_pod_check_spec.rb
Florian Staudacher ea397ffdfb Add connection test for pods in the network
* add a class for checking pod connectivity
* extend pod model to handle new functionality
* add an admin frontend to list pods and re-trigger checks manually
* add a daily worker to run through all the pods
* add unit tests for most of the new code
2015-08-24 22:04:53 +02:00

17 lines
382 B
Ruby

require "spec_helper"
describe Workers::RecurringPodCheck do
before do
@pods = (0..4).map do
FactoryGirl.create(:pod).tap { |pod|
expect(pod).to receive(:test_connection!)
}
end
allow(Pod).to receive(:find_in_batches) { @pods }
end
it "performs a connection test on all existing pods" do
Workers::RecurringPodCheck.new.perform
end
end