mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-14 11:03:09 +02:00
20 lines
386 B
Go
20 lines
386 B
Go
|
package log
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
)
|
||
|
|
||
|
func TestSetErrorCategory(t *testing.T) {
|
||
|
SetErrorCategory(ErrorCustom)
|
||
|
assert.Equal(t, errorCategory, ErrorCustom)
|
||
|
assert.Equal(t, "custom", fmt.Sprint(errorCategory))
|
||
|
}
|
||
|
|
||
|
func TestGetErrorCategory(t *testing.T) {
|
||
|
errorCategory = ErrorCompliance
|
||
|
assert.Equal(t, GetErrorCategory(), errorCategory)
|
||
|
}
|