func TestGetFileNameWithQueries_ShouldReturnEncodedFilename(t *testing.T) { //GET-/example/query?value=abc&value2=cba = RYK2253FOOJI773UXZASWXUM4AA3CTEF expectedFilename := "RYK2253FOOJI773UXZASWXUM4AA3CTEF" m := model.MockConf{URI: "/example/query?value=abc&value2=cba", Method: "GET", ContentType: "contentType", StatusCode: 418} got := m.GetFileName() if got != expectedFilename { t.Errorf("Expected: %v but got: %v", expectedFilename, got) } }
func TestGetFileName_ShouldReturnEncodedFilename(t *testing.T) { //Equals to base 32 uri = / method = GET expectedFilename := "AZH5Y2SPPMLFNUGNVXRJGON64IUV3FNB" m := model.MockConf{URI: "/", Method: "GET", ContentType: "contentType", StatusCode: 418} got := m.GetFileName() if got != expectedFilename { t.Errorf("Expected: %v but got: %v", expectedFilename, got) } }