1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-22 04:08:49 +02:00
goreleaser/internal/testlib/mktemp_test.go

20 lines
326 B
Go
Raw Normal View History

2017-07-23 16:27:46 -03:00
package testlib
import (
"os"
"testing"
"github.com/stretchr/testify/assert"
)
func TestMkTemp(t *testing.T) {
current, err := os.Getwd()
assert.NoError(t, err)
2017-07-23 16:27:46 -03:00
folder, back := Mktmp(t)
assert.NotEmpty(t, folder)
2017-07-23 16:27:46 -03:00
back()
newCurrent, err := os.Getwd()
assert.NoError(t, err)
assert.Equal(t, current, newCurrent)
2017-07-23 16:27:46 -03:00
}