Make Public values explicit
parent
29815774f0
commit
0424f9f92e
|
@ -187,7 +187,7 @@ func TestOrganizationsStore_All(t *testing.T) {
|
|||
{
|
||||
Name: bolt.DefaultOrganizationName,
|
||||
DefaultRole: bolt.DefaultOrganizationRole,
|
||||
Public: true,
|
||||
Public: bolt.DefaultOrganizationPublic,
|
||||
},
|
||||
{
|
||||
Name: "EE - Evil Empire",
|
||||
|
@ -621,7 +621,7 @@ func TestOrganizationsStore_DefaultOrganization(t *testing.T) {
|
|||
ID: bolt.DefaultOrganizationID,
|
||||
Name: bolt.DefaultOrganizationName,
|
||||
DefaultRole: bolt.DefaultOrganizationRole,
|
||||
Public: true,
|
||||
Public: bolt.DefaultOrganizationPublic,
|
||||
},
|
||||
wantErr: false,
|
||||
},
|
||||
|
|
|
@ -124,6 +124,7 @@ func TestService_Me(t *testing.T) {
|
|||
return &chronograf.Organization{
|
||||
ID: 0,
|
||||
Name: "The Bad Place",
|
||||
Public: false,
|
||||
}, nil
|
||||
},
|
||||
},
|
||||
|
@ -255,6 +256,7 @@ func TestService_Me(t *testing.T) {
|
|||
return &chronograf.Organization{
|
||||
ID: 0,
|
||||
Name: "The Bad Place",
|
||||
Public: false,
|
||||
}, nil
|
||||
},
|
||||
},
|
||||
|
@ -463,6 +465,7 @@ func TestService_UpdateMe(t *testing.T) {
|
|||
return &chronograf.Organization{
|
||||
ID: 1337,
|
||||
Name: "The ThrillShilliettos",
|
||||
Public: false,
|
||||
}, nil
|
||||
case 0:
|
||||
return &chronograf.Organization{
|
||||
|
|
|
@ -54,6 +54,7 @@ func TestService_OrganizationID(t *testing.T) {
|
|||
return &chronograf.Organization{
|
||||
ID: 1337,
|
||||
Name: "The Good Place",
|
||||
Public: false,
|
||||
}, nil
|
||||
default:
|
||||
return nil, fmt.Errorf("Organization with ID %s not found", *q.ID)
|
||||
|
@ -140,10 +141,12 @@ func TestService_Organizations(t *testing.T) {
|
|||
chronograf.Organization{
|
||||
ID: 1337,
|
||||
Name: "The Good Place",
|
||||
Public: true,
|
||||
},
|
||||
chronograf.Organization{
|
||||
ID: 100,
|
||||
Name: "The Bad Place",
|
||||
Public: false,
|
||||
},
|
||||
}, nil
|
||||
},
|
||||
|
@ -151,7 +154,7 @@ func TestService_Organizations(t *testing.T) {
|
|||
},
|
||||
wantStatus: http.StatusOK,
|
||||
wantContentType: "application/json",
|
||||
wantBody: `{"links":{"self":"/chronograf/v1/organizations"},"organizations":[{"links":{"self":"/chronograf/v1/organizations/1337"},"id":"1337","name":"The Good Place","public":false},{"links":{"self":"/chronograf/v1/organizations/100"},"id":"100","name":"The Bad Place","public":false}]}`,
|
||||
wantBody: `{"links":{"self":"/chronograf/v1/organizations"},"organizations":[{"links":{"self":"/chronograf/v1/organizations/1337"},"id":"1337","name":"The Good Place","public":true},{"links":{"self":"/chronograf/v1/organizations/100"},"id":"100","name":"The Bad Place","public":false}]}`,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -228,6 +231,7 @@ func TestService_UpdateOrganization(t *testing.T) {
|
|||
ID: 1337,
|
||||
Name: "The Good Place",
|
||||
DefaultRole: roles.ViewerRoleName,
|
||||
Public: true,
|
||||
}, nil
|
||||
},
|
||||
},
|
||||
|
@ -235,7 +239,7 @@ func TestService_UpdateOrganization(t *testing.T) {
|
|||
id: "1337",
|
||||
wantStatus: http.StatusOK,
|
||||
wantContentType: "application/json",
|
||||
wantBody: `{"id":"1337","name":"The Bad Place","defaultRole":"viewer","links":{"self":"/chronograf/v1/organizations/1337"},"public":false}`,
|
||||
wantBody: `{"id":"1337","name":"The Bad Place","defaultRole":"viewer","links":{"self":"/chronograf/v1/organizations/1337"},"public":true}`,
|
||||
},
|
||||
{
|
||||
name: "Update Organization public",
|
||||
|
@ -261,6 +265,7 @@ func TestService_UpdateOrganization(t *testing.T) {
|
|||
ID: 1337,
|
||||
Name: "The Good Place",
|
||||
DefaultRole: roles.ViewerRoleName,
|
||||
Public: true,
|
||||
}, nil
|
||||
},
|
||||
},
|
||||
|
@ -292,6 +297,7 @@ func TestService_UpdateOrganization(t *testing.T) {
|
|||
ID: 1337,
|
||||
Name: "The Good Place",
|
||||
DefaultRole: roles.ViewerRoleName,
|
||||
Public: true,
|
||||
}, nil
|
||||
},
|
||||
},
|
||||
|
@ -325,6 +331,7 @@ func TestService_UpdateOrganization(t *testing.T) {
|
|||
ID: 1337,
|
||||
Name: "The Good Place",
|
||||
DefaultRole: roles.MemberRoleName,
|
||||
Public: false,
|
||||
}, nil
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue