test/logger_test.rb in semantic_logger-4.2.1 vs test/logger_test.rb in semantic_logger-4.2.2

- old
+ new

@@ -86,9 +86,16 @@ assert log = log_message assert_equal 'hello world', log.message assert_equal payload, log.payload end + it 'logs payload from block' do + logger.send(level) { { 'test_key1' => 'hello world', 'test_key2' => payload} } + + assert log = log_message + assert_equal log.payload, { 'test_key1' => 'hello world', 'test_key2' => payload } + end + it 'logs payload only' do logger.send(level, payload: payload) assert log = log_message refute log.message