tests-update #100

Merged
lash merged 3 commits from tests-update into master 2024-09-27 22:14:51 +02:00
Showing only changes of commit a3ff3be5b1 - Show all commits

View File

@ -96,8 +96,6 @@ func TestCreateAccount(t *testing.T) {
mockDataStore.AssertExpectations(t) mockDataStore.AssertExpectations(t)
} }
func TestWithPersister(t *testing.T) { func TestWithPersister(t *testing.T) {
// Test case: Setting a persister // Test case: Setting a persister
h := &Handlers{} h := &Handlers{}
@ -117,7 +115,6 @@ func TestWithPersister_PanicWhenAlreadySet(t *testing.T) {
}, "Should panic when trying to set a persister again.") }, "Should panic when trying to set a persister again.")
} }
func TestSaveFirstname(t *testing.T) { func TestSaveFirstname(t *testing.T) {
// Create a new instance of MockMyDataStore // Create a new instance of MockMyDataStore
mockStore := new(mocks.MockUserDataStore) mockStore := new(mocks.MockUserDataStore)
@ -341,25 +338,19 @@ func TestSaveGender(t *testing.T) {
expectCall: true, expectCall: true,
}, },
{ {
name: "Valid Female Input", name: "Valid Female Input",
input: []byte("2"), input: []byte("2"),
expectedGender: "female", expectedGender: "female",
executingSymbol: "set_female", executingSymbol: "set_female",
expectCall: true, expectCall: true,
}, },
{ {
name: "Valid Unspecified Input", name: "Valid Unspecified Input",
input: []byte("3"), input: []byte("3"),
executingSymbol: "set_unspecified", executingSymbol: "set_unspecified",
expectedGender: "unspecified", expectedGender: "unspecified",
expectCall: true, expectCall: true,
}, },
// {
// name: "Empty Input",
// input: []byte(""),
// expectedGender: "",
// expectCall: false,
// },
} }
for _, tt := range tests { for _, tt := range tests {
@ -588,13 +579,6 @@ func TestSetLanguage(t *testing.T) {
Content: "swa", Content: "swa",
}, },
}, },
// {
// name: "Unhandled path",
// execPath: []string{""},
// expectedResult: resource.Result{
// FlagSet: []uint32{8},
// },
// },
} }
for _, tt := range tests { for _, tt := range tests {