~juju-qa/ubuntu/xenial/juju/xenial-2.0-beta3

« back to all changes in this revision

Viewing changes to src/gopkg.in/macaroon-bakery.v1/bakery/example/example_test.go

  • Committer: Martin Packman
  • Date: 2016-03-30 19:31:08 UTC
  • mfrom: (1.1.41)
  • Revision ID: martin.packman@canonical.com-20160330193108-h9iz3ak334uk0z5r
Merge new upstream source 2.0~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
package main
2
2
 
3
3
import (
4
 
        "fmt"
5
4
        "net/http"
6
 
        "net/url"
7
5
        "testing"
8
6
 
9
7
        gc "gopkg.in/check.v1"
10
8
 
11
9
        "gopkg.in/macaroon-bakery.v1/bakery"
12
 
        "gopkg.in/macaroon-bakery.v1/httpbakery"
13
10
)
14
11
 
15
12
func TestPackage(t *testing.T) {
63
60
                c.Assert(resp, gc.Equals, "hello, world\n")
64
61
        }
65
62
}
66
 
 
67
 
func newClient() *httpbakery.Client {
68
 
        return &httpbakery.Client{
69
 
                Client: httpbakery.NewHTTPClient(),
70
 
                VisitWebPage: func(url *url.URL) error {
71
 
                        fmt.Printf("please visit this web page:\n")
72
 
                        fmt.Printf("\t%s\n", url)
73
 
                        return nil
74
 
                },
75
 
        }
76
 
}