github.com/drone/runner-go@v1.12.0/logger/logger_test.go (about)

     1  // Copyright 2019 Drone.IO Inc. All rights reserved.
     2  // Use of this source code is governed by the Polyform License
     3  // that can be found in the LICENSE file.
     4  
     5  package logger
     6  
     7  import "testing"
     8  
     9  func TestWithError(t *testing.T) {
    10  	d := &discard{}
    11  	if d.WithError(nil) != d {
    12  		t.Errorf("Expect WithError to return base logger")
    13  	}
    14  }
    15  
    16  func TestWithField(t *testing.T) {
    17  	d := &discard{}
    18  	if d.WithField("hello", "world") != d {
    19  		t.Errorf("Expect WithField to return base logger")
    20  	}
    21  }