Skip to content

Commit

Permalink
fix: Create Communication Setting Test
Browse files Browse the repository at this point in the history
fixed one of the json keys 'channel_name' => 'channelName'

additionally I've reordered the assertion arguments as it should be of the form :
`assert.Equal(t, expected, result)`
  • Loading branch information
9albi authored Jul 17, 2024
1 parent bca02ac commit aa7730c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/cloudconformity/create_communication_setting_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ func TestCreateCommunicationSettingSuccess(t *testing.T) {
response, err := client.CreateCommunicationSetting(CommunicationSettings{})
// check the results
assert.Nil(t, err)
assert.Equal(t, response.Data[0].Attributes.Configuration.ChannelName, expectedChannelName)
assert.Equal(t, expectedChannelName, response.Data[0].Attributes.Configuration.ChannelName)

assert.Equal(t, response.Data[1].Attributes.Configuration.ChannelName, "testSNSChannel")
assert.Equal(t, response.Data[1].Attributes.Filter.Statuses[0], "SUCCESS")
assert.Equal(t, "testSNSChannel", response.Data[1].Attributes.Configuration.ChannelName)
assert.Equal(t, "SUCCESS", response.Data[1].Attributes.Filter.Statuses[0])
}

func TestCreateCommunicationSettingFail(t *testing.T) {
Expand Down Expand Up @@ -88,7 +88,7 @@ var testCreateCommunicationSettingSuccessResponse = `
"statuses": ["SUCCESS"]
},
"configuration": {
"channel_name": "testSNSChannel",
"channelName": "testSNSChannel",
"arn": "sns-t-UoU9CsK"
}
},
Expand Down

0 comments on commit aa7730c

Please sign in to comment.