mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 08:38:45 +05:00
Added tests in utils
This commit is contained in:
committed by
Dan Christian Bogos
parent
318145d7c5
commit
56f9d16cc0
@@ -1514,13 +1514,6 @@ func TestIsURL(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestComputeHashError(t *testing.T) {
|
||||
_, err := ComputeHash("test1;test2;test3")
|
||||
if err != nil {
|
||||
t.Errorf("Expecting: <nil>, received: %+v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestComputeHashMatch(t *testing.T) {
|
||||
lns, _ := ComputeHash("test1;test2;test3")
|
||||
if err := VerifyHash(lns, "test1;test2;test3"); err != true {
|
||||
@@ -1585,3 +1578,10 @@ func TestAESEncryptDecrypt(t *testing.T) {
|
||||
t.Errorf("Expecting: <exampleText>, received: <%+v>", dString)
|
||||
}
|
||||
}
|
||||
|
||||
func TestBoolGenerator(t *testing.T) {
|
||||
boolTest := BoolGenerator().RandomBool()
|
||||
if boolTest != true && boolTest != false {
|
||||
t.Errorf("Needs to be bool")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user