diff --git a/src/internal/m365/graph/errors_test.go b/src/internal/m365/graph/errors_test.go index ffc1b85d6..c291c8b8e 100644 --- a/src/internal/m365/graph/errors_test.go +++ b/src/internal/m365/graph/errors_test.go @@ -484,17 +484,17 @@ func (suite *GraphErrorsUnitSuite) TestGraphStack_labels() { { name: "mysite not found", err: odErrMsg("code", string(MysiteNotFound)), - expect: []string{}, + expect: []string{LabelsMysiteNotFound}, }, { name: "mysite url not found", err: odErrMsg("code", string(MysiteURLNotFound)), - expect: []string{}, + expect: []string{LabelsMysiteNotFound}, }, { name: "no sp license", err: odErrMsg("code", string(NoSPLicense)), - expect: []string{}, + expect: []string{LabelsNoSharePointLicense}, }, } for _, test := range table { @@ -509,6 +509,11 @@ func (suite *GraphErrorsUnitSuite) TestGraphStack_labels() { for _, e := range test.expect { assert.True(t, clues.HasLabel(result, e), clues.ToCore(result)) } + + labels := clues.Labels(result) + assert.Equal(t, + len(test.expect), len(labels), + "result should have as many labels as expected") }) } }