-
-
Notifications
You must be signed in to change notification settings - Fork 399
Expand file tree
/
Copy pathvote_ops_test.go
More file actions
29 lines (23 loc) · 654 Bytes
/
vote_ops_test.go
File metadata and controls
29 lines (23 loc) · 654 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//go:build !integration
// +build !integration
package main
import (
"context"
"io"
"strings"
"testing"
"github.com/Jguer/aur"
"github.com/stretchr/testify/require"
mockaur "github.com/Jguer/yay/v12/pkg/dep/mock"
"github.com/Jguer/yay/v12/pkg/text"
)
func TestHandlePackageVoteNoResults(t *testing.T) {
t.Parallel()
logger := text.NewLogger(io.Discard, io.Discard, strings.NewReader(""), false, "test")
err := handlePackageVote(context.Background(), []string{"missing"}, &mockaur.MockAUR{
GetFn: func(ctx context.Context, query *aur.Query) ([]aur.Pkg, error) {
return nil, nil
},
}, logger, nil, true)
require.NoError(t, err)
}