init push
This commit is contained in:
22
internal/repository/mysql/delete_guard_test.go
Normal file
22
internal/repository/mysql/delete_guard_test.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package mysql
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestModuleNameFromTable(t *testing.T) {
|
||||
tests := []struct {
|
||||
table string
|
||||
want string
|
||||
}{
|
||||
{table: "takeover_acs", want: "takeover"},
|
||||
{table: "base_operational_shift_times", want: "base operational shift times"},
|
||||
{table: "base_contact_roles", want: "base contact roles"},
|
||||
{table: "duls", want: "dul"},
|
||||
{table: "takeover_other_people", want: "takeover other people"},
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
if got := moduleNameFromTable(tc.table); got != tc.want {
|
||||
t.Fatalf("moduleNameFromTable(%q) = %q, want %q", tc.table, got, tc.want)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user