Update utils_test to use require.Equal
The following discussion from !1432 (merged) should be addressed:
-
@patrickbajao started a discussion: Can we utilize
require.Equal
here since we're already usingrequire
in this test file?require.Equal(t, tt.want, filePathWanted, "SanitizePathName() got = %s, want = %s")
This is going to be inconsistent with the rest of the file so I think we can have this as a follow up issue to refactor this entire file to utilize
require
package. So this is non-blocking.
Implementation plan
- Use
assert.Equal
orrequire.Equal
instead of code like:
if filePathWanted != tt.want {
t.Errorf("SanitizePathName() got = %s, want = %s", filePathWanted, tt.want)
}
- We could most likely use this everywhere since we're already using the require library.
Edited by Gary Holtz