Skip to content

Commit

Permalink
refactor: change hardcoded expected response to var message
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-azion committed May 3, 2023
1 parent 48a83d8 commit 1343101
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/cmd/device_groups/delete/delete_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package delete

import (
"fmt"
"testing"

msg "github.com/aziontech/azion-cli/messages/device_groups"
"github.com/aziontech/azion-cli/pkg/httpmock"
"github.com/aziontech/azion-cli/pkg/testutils"
"github.com/stretchr/testify/assert"
Expand All @@ -27,7 +29,7 @@ func TestCreate(t *testing.T) {
_, err := cmd.ExecuteC()
require.NoError(t, err)

assert.Equal(t, "Device Group 4321 was successfully deleted\n", stdout.String())
assert.Equal(t, fmt.Sprintf(msg.DeviceGroupsDeleteOutputSuccess, 4321), stdout.String())
})

t.Run("try delete device group that is not found", func(t *testing.T) {
Expand Down

0 comments on commit 1343101

Please sign in to comment.