Make InvalidToken test useful again.
This commit is contained in:
parent
5f9326d165
commit
2cbd402bae
1 changed files with 7 additions and 1 deletions
|
@ -86,10 +86,16 @@ func TestNew(t *testing.T) {
|
|||
|
||||
// TestInvalidToken tests the New() function with an invalid token
|
||||
func TestInvalidToken(t *testing.T) {
|
||||
_, err := New("asjkldhflkjasdh")
|
||||
d, err := New("asjkldhflkjasdh")
|
||||
if err != nil {
|
||||
t.Fatalf("New(InvalidToken) returned error: %+v", err)
|
||||
}
|
||||
|
||||
// New with just a token does not do any communication, so attempt an api call.
|
||||
_, err = d.UserSettings()
|
||||
if err == nil {
|
||||
t.Errorf("New(InvalidToken), d.UserSettings returned nil error.")
|
||||
}
|
||||
}
|
||||
|
||||
// TestInvalidUserPass tests the New() function with an invalid Email and Pass
|
||||
|
|
Loading…
Reference in a new issue