test/processor_test.rb in larva-0.4.0 vs test/processor_test.rb in larva-0.4.1
- old
+ new
@@ -47,19 +47,30 @@
Propono.config.logger.expects(:info).with(output)
NormalProcessor.any_instance.expects(:process).returns(true)
NormalProcessor.process(message)
end
- def test_process_logs_message
+ def test_process_logs_error_with_false_handler
entity = "media_file"
action = "processed"
message = {entity: entity, action: action, media_file_id: "8"}
output = "Unrecognized event type, entity: #{entity} action: #{action}."
Propono.config.logger.stubs(:info)
Propono.config.logger.expects(:info).with(output)
NormalProcessor.any_instance.expects(:process).returns(false)
NormalProcessor.process(message)
+ end
+
+ def test_process_logs_error_with_no_handler
+ entity = "comment"
+ action = "created"
+ message = {entity: entity, action: action, media_file_id: "8"}
+ output = "Unrecognized event type, entity: #{entity} action: #{action}."
+
+ Propono.config.logger.stubs(:info)
+ Propono.config.logger.expects(:info).with(output)
+ MetaProcessor.process(message)
end
end
end