mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-24 04:16:27 +02:00
979f8632b7
* 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>
20 lines
331 B
Go
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)
|
|
}
|