1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-24 04:16:27 +02:00
goreleaser/internal/testlib/mktemp_test.go
Carlos Alexandro Becker 979f8632b7
refactor: use require on all tests (#1839)
* refactor: use require on all tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* refactor: use require on all tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-10-06 12:48:04 +00:00

20 lines
331 B
Go

package testlib
import (
"os"
"testing"
"github.com/stretchr/testify/require"
)
func TestMkTemp(t *testing.T) {
current, err := os.Getwd()
require.NoError(t, err)
folder, back := Mktmp(t)
require.NotEmpty(t, folder)
back()
newCurrent, err := os.Getwd()
require.NoError(t, err)
require.Equal(t, current, newCurrent)
}