Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: f9fa00236d
Fetching contributors…

Cannot retrieve contributors at this time

16 lines (13 sloc) 0.39 kb
package tripit
import (
"net/http"
"testing"
)
func TestWebAuth(t *testing.T) {
r, _ := http.NewRequest("GET", "http://www.google.com", nil)
c := &WebAuthCredential{"user@site.com", "password"}
c.Authorize(r, nil)
if r.Header["Authorization"][0] != "Basic dXNlckBzaXRlLmNvbTpwYXNzd29yZA==" {
t.Errorf("Basic authorization header incorrect: %s", r.Header["Authorization"][0])
}
}
Jump to Line
Something went wrong with that request. Please try again.