Skip to content

Commit

Permalink
Replace stubbed response value
Browse files Browse the repository at this point in the history
  • Loading branch information
dbolson committed Apr 23, 2024
1 parent 2dc7598 commit 947cf1d
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion cmd/cmdtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"ldcli/internal/analytics"
)

var ValidResponse = `{"valid": true}`
var StubbedSuccessResponse = `{
"key": "test-key",
"name": "test-name"
Expand Down
2 changes: 1 addition & 1 deletion cmd/environments/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func TestGet(t *testing.T) {
client := environments.MockClient{}
client.
On("Get", mockArgs...).
Return([]byte(cmd.ValidResponse), nil)
Return([]byte(cmd.StubbedSuccessResponse), nil)
clients := cmd.APIClients{
EnvironmentsClient: &client,
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/flags/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func TestCreate(t *testing.T) {
client := flags.MockClient{}
client.
On("Create", mockArgs...).
Return([]byte(cmd.ValidResponse), nil)
Return([]byte(cmd.StubbedSuccessResponse), nil)
clients := cmd.APIClients{
FlagsClient: &client,
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/flags/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func TestUpdate(t *testing.T) {
client := flags.MockClient{}
client.
On("Update", mockArgs...).
Return([]byte(cmd.ValidResponse), nil)
Return([]byte(cmd.StubbedSuccessResponse), nil)
clients := cmd.APIClients{
FlagsClient: &client,
}
Expand Down Expand Up @@ -272,7 +272,7 @@ func TestToggle(t *testing.T) {
client := flags.MockClient{}
client.
On("Update", mockArgs...).
Return([]byte(cmd.ValidResponse), nil)
Return([]byte(cmd.StubbedSuccessResponse), nil)
clients := cmd.APIClients{
FlagsClient: &client,
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/members/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func TestCreate(t *testing.T) {
client := members.MockClient{}
client.
On("Create", mockArgs...).
Return([]byte(cmd.ValidResponse), nil)
Return([]byte(cmd.StubbedSuccessResponse), nil)
clients := cmd.APIClients{
MembersClient: &client,
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/projects/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func TestCreate(t *testing.T) {
client := projects.MockClient{}
client.
On("Create", mockArgs...).
Return([]byte(cmd.ValidResponse), nil)
Return([]byte(cmd.StubbedSuccessResponse), nil)
clients := cmd.APIClients{
ProjectsClient: &client,
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/projects/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func TestList(t *testing.T) {
client := projects.MockClient{}
client.
On("List", mockArgs...).
Return([]byte(cmd.ValidResponse), nil)
Return([]byte(cmd.StubbedSuccessResponse), nil)
clients := cmd.APIClients{
ProjectsClient: &client,
}
Expand Down

0 comments on commit 947cf1d

Please sign in to comment.