"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pkg/cmd/pr/shared/params_test.go" between
gh-cli-1.10.3.tar.gz and gh-cli-1.11.0.tar.gz

About: GitHub CLI is GitHub’s official command line tool.

params_test.go  (gh-cli-1.10.3):params_test.go  (gh-cli-1.11.0)
package shared package shared
import ( import (
"github.com/stretchr/testify/assert"
"net/http" "net/http"
"reflect" "reflect"
"testing" "testing"
"github.com/cli/cli/api" "github.com/cli/cli/api"
"github.com/cli/cli/internal/ghrepo" "github.com/cli/cli/internal/ghrepo"
"github.com/cli/cli/pkg/httpmock" "github.com/cli/cli/pkg/httpmock"
) )
func Test_listURLWithQuery(t *testing.T) { func Test_listURLWithQuery(t *testing.T) {
skipping to change at line 154 skipping to change at line 155
if !reflect.DeepEqual(got, tt.want) { if !reflect.DeepEqual(got, tt.want) {
t.Errorf("ReplaceAtMeLogin() = %v, want %v", got, tt.want) t.Errorf("ReplaceAtMeLogin() = %v, want %v", got, tt.want)
} }
if tt.verify != nil { if tt.verify != nil {
tt.verify(t) tt.verify(t)
} }
}) })
} }
} }
func Test_QueryHasStateClause(t *testing.T) {
tests := []struct {
searchQuery string
hasState bool
}{
{
searchQuery: "is:closed is:merged",
hasState: true,
},
{
searchQuery: "author:mislav",
hasState: false,
},
{
searchQuery: "assignee:g14a mentions:vilmibm",
hasState: false,
},
{
searchQuery: "merged:>2021-05-20",
hasState: true,
},
{
searchQuery: "state:merged state:open",
hasState: true,
},
{
searchQuery: "assignee:g14a is:closed",
hasState: true,
},
{
searchQuery: "state:closed label:bug",
hasState: true,
},
}
for _, tt := range tests {
gotState := QueryHasStateClause(tt.searchQuery)
assert.Equal(t, tt.hasState, gotState)
}
}
 End of changes. 2 change blocks. 
0 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)