Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Side by Side Diff: go/src/infra/appengine/test-results/frontend/get_test.go

Issue 2251623002: test-results: Get handler cleanup (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@x_3
Patch Set: (Rebase) Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 package frontend
2
3 import (
4 "bytes"
5 "io/ioutil"
6 "testing"
7
8 . "github.com/smartystreets/goconvey/convey"
9 )
10
11 func TestWrapCallback(t *testing.T) {
12 t.Parallel()
13
14 Convey("wrapCallback", t, func() {
15 expected := []byte(`foo({"hello":"world"});`)
16 result := wrapCallback(
17 bytes.NewReader([]byte(`{"hello":"world"}`)),
18 "foo",
19 )
20 b, err := ioutil.ReadAll(result)
21 So(err, ShouldBeNil)
22 So(b, ShouldResemble, expected)
23 })
24 }
OLDNEW
« no previous file with comments | « go/src/infra/appengine/test-results/frontend/get.go ('k') | go/src/infra/appengine/test-results/frontend/handlers.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698