mirror of
https://github.com/gfleury/go-bitbucket-v1.git
synced 2025-04-18 22:48:06 -05:00
Fixing call to SetPermissionForGroup
This commit is contained in:
parent
c4258a07ac
commit
621ff29cd2
@ -5127,6 +5127,8 @@ func TestDefaultApiService_SetPermissionForGroup(t *testing.T) {
|
|||||||
client *APIClient
|
client *APIClient
|
||||||
}
|
}
|
||||||
type args struct {
|
type args struct {
|
||||||
|
projectKey string
|
||||||
|
repositorySlug string
|
||||||
localVarOptionals map[string]interface{}
|
localVarOptionals map[string]interface{}
|
||||||
}
|
}
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
@ -5136,14 +5138,14 @@ func TestDefaultApiService_SetPermissionForGroup(t *testing.T) {
|
|||||||
want *APIResponse
|
want *APIResponse
|
||||||
wantErr bool
|
wantErr bool
|
||||||
}{
|
}{
|
||||||
{"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/permissions/groups: context canceled"}, true},
|
{"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects//repos//permissions/groups: context canceled"}, true},
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
a := &DefaultApiService{
|
a := &DefaultApiService{
|
||||||
client: tt.fields.client,
|
client: tt.fields.client,
|
||||||
}
|
}
|
||||||
got, err := a.SetPermissionForGroup(tt.args.localVarOptionals)
|
got, err := a.SetPermissionForGroup(tt.args.projectKey, tt.args.repositorySlug, tt.args.localVarOptionals)
|
||||||
if (err != nil) != tt.wantErr {
|
if (err != nil) != tt.wantErr {
|
||||||
t.Errorf("DefaultApiService.SetPermissionForGroup() error = %v, wantErr %v", err, tt.wantErr)
|
t.Errorf("DefaultApiService.SetPermissionForGroup() error = %v, wantErr %v", err, tt.wantErr)
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user