Skip to content

Commit

Permalink
Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Veronika Solovei committed Jun 2, 2021
1 parent 370b63c commit 977c999
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
"consent": "TESTCONSENT",
"consented_providers_settings": {
"consented_providers": [1608,765,492,1365,5678,1545,2563,1411]
},
"test": 123
}
}
},
"tmax": 500
Expand Down Expand Up @@ -87,8 +86,7 @@
"id": "db089de9-a62e-4861-a881-0ff15e052516",
"buyeruid": "v4_bidder_token",
"ext": {
"consent": "TESTCONSENT",
"test": 123
"consent": "TESTCONSENT"
}
},
"tmax": 500,
Expand Down
8 changes: 4 additions & 4 deletions util/jsonutil/jsonutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ func TestDropElement(t *testing.T) {
for _, tt := range tests {
res, err := DropElement(tt.input, tt.elementToRemove)

if !tt.errorExpected {
assert.NoError(t, err, "Error should be nil")
assert.Equal(t, tt.output, res, "Result is incorrect")
} else {
if tt.errorExpected {
assert.Error(t, err, "Error should not be nil")
assert.True(t, strings.Contains(err.Error(), tt.errorContains))
} else {
assert.NoError(t, err, "Error should be nil")
assert.Equal(t, tt.output, res, "Result is incorrect")
}

}
Expand Down

0 comments on commit 977c999

Please sign in to comment.