Skip to content

Commit 24f21ff

Browse files
committed
test: add different version test
1 parent 24fbebf commit 24f21ff

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

daemon/internal/newrelic/app_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@ func TestFilterPhpPackages(t *testing.T) {
623623
validData := []byte(`[["drupal","6.0",{}]]`)
624624
moreValidData := []byte(`[["wordpress","7.0",{}],["symfony","5.1",{}]]`)
625625
duplicateData := []byte(`[["drupal","6.0",{}]]`)
626+
versionData := []byte(`[["drupal","9.0",{}]]`)
626627

627628
filteredData := app.filterPhpPackages(nilData)
628629
if filteredData != nil {
@@ -650,4 +651,10 @@ func TestFilterPhpPackages(t *testing.T) {
650651
if filteredData != nil {
651652
t.Errorf("expected 'nil', got [%v]", filteredData)
652653
}
654+
655+
expect = []byte(`[["drupal","9.0",{}]]`)
656+
filteredData = app.filterPhpPackages(versionData)
657+
if string(filteredData) != string(expect) {
658+
t.Errorf("expected [%v], got [%v]", string(expect), string(filteredData))
659+
}
653660
}

0 commit comments

Comments
 (0)