oauth2: removing unnecessary interface definitions.

This commit is contained in:
Burcu Dogan
2014-05-10 14:16:50 +03:00
parent 1e1d5bfc0f
commit 1b3c225070
4 changed files with 35 additions and 57 deletions

View File

@@ -15,7 +15,7 @@ func (t *mockTransport) RoundTrip(req *http.Request) (resp *http.Response, err e
return t.rt(req)
}
func newTestConf() Config {
func newTestConf() *Config {
conf, _ := NewConfig(&Options{
ClientID: "CLIENT_ID",
ClientSecret: "CLIENT_SECRET",
@@ -77,7 +77,7 @@ func TestExchangingTransport(t *testing.T) {
func TestFetchWithNoRedirect(t *testing.T) {
DefaultTransport = http.DefaultTransport
fetcher := newTestConf().(TokenFetcher)
fetcher := newTestConf()
_, err := fetcher.FetchToken(&Token{})
if err == nil {
t.Fatalf("Fetch should return an error if no refresh token is set")