Commit e3cea042 authored by karthic rao's avatar karthic rao

Left over comments removed

Redundant comments in the code removed
parent 73026974
package browse package browse
import ( import (
//"bytes" "encoding/json"
"encoding/json"
"github.com/mholt/caddy/middleware" "github.com/mholt/caddy/middleware"
"net/http" "net/http"
"net/http/httptest" "net/http/httptest"
...@@ -191,7 +190,7 @@ func TestBrowseJson(t *testing.T) { ...@@ -191,7 +190,7 @@ func TestBrowseJson(t *testing.T) {
} }
actualJsonResponseString := rec.Body.String() actualJsonResponseString := rec.Body.String()
//t.Logf("json response body: %s\n", respBody)
//generating the listing to compare it with the response body //generating the listing to compare it with the response body
file, err := os.Open(b.Root + req.URL.Path) file, err := os.Open(b.Root + req.URL.Path)
if err != nil { if err != nil {
...@@ -233,12 +232,10 @@ func TestBrowseJson(t *testing.T) { ...@@ -233,12 +232,10 @@ func TestBrowseJson(t *testing.T) {
listing.Order = "asc" listing.Order = "asc"
listing.applySort() listing.applySort()
//var buf bytes.Buffer
marsh, err := json.Marshal(listing.Items) marsh, err := json.Marshal(listing.Items)
if err != nil { if err != nil {
t.Fatalf("Unable to Marshal the listing ") t.Fatalf("Unable to Marshal the listing ")
} }
//t.Logf("json value: %s\n", string(marsh))
expectedJsonString := string(marsh) expectedJsonString := string(marsh)
if actualJsonResponseString != expectedJsonString { if actualJsonResponseString != expectedJsonString {
t.Errorf("Json response string doesnt match the expected Json response ") t.Errorf("Json response string doesnt match the expected Json response ")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment