mirror of
https://github.com/Slug-Boi/cocommit.git
synced 2026-05-13 12:45:47 +00:00
test:update util tests and remove a line
This commit is contained in:
@@ -33,7 +33,6 @@ type item string
|
|||||||
var selected = map[string]item{}
|
var selected = map[string]item{}
|
||||||
|
|
||||||
var negation = false
|
var negation = false
|
||||||
var ignore = false
|
|
||||||
|
|
||||||
var dupProtect = map[string]string{}
|
var dupProtect = map[string]string{}
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ func Test_DeleteAuthor(t *testing.T) {
|
|||||||
t.Errorf("DeleteOneAuthor() did not delete author")
|
t.Errorf("DeleteOneAuthor() did not delete author")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Author tests END
|
// Author tests END
|
||||||
|
|
||||||
// User tests BEGIN
|
// User tests BEGIN
|
||||||
@@ -79,6 +80,27 @@ func Test_RemoveUser(t *testing.T) {
|
|||||||
t.Errorf("RemoveUser() = %v; want 3", len(utils.Users))
|
t.Errorf("RemoveUser() = %v; want 3", len(utils.Users))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Test_TempAddUser(t *testing.T) {
|
||||||
|
setup()
|
||||||
|
defer teardown()
|
||||||
|
// Test TempAddUser
|
||||||
|
utils.Define_users("author_file_test")
|
||||||
|
if len(utils.Users) != 4 {
|
||||||
|
t.Errorf("Define_users() = %v; want 4", len(utils.Users))
|
||||||
|
}
|
||||||
|
|
||||||
|
utils.TempAddUser("temp", "temp@test.io")
|
||||||
|
|
||||||
|
if len(utils.Users) != 5 {
|
||||||
|
t.Errorf("TempAddUser() = %v; want 5", len(utils.Users))
|
||||||
|
}
|
||||||
|
|
||||||
|
if _, ok := utils.Users["temp"]; !ok {
|
||||||
|
t.Errorf("TempAddUser() did not add user")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
// User tests END
|
// User tests END
|
||||||
|
|
||||||
// Commit tests BEGIN
|
// Commit tests BEGIN
|
||||||
|
|||||||
Reference in New Issue
Block a user