diff options
Diffstat (limited to 'integration_test.go')
-rw-r--r-- | integration_test.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/integration_test.go b/integration_test.go index 88ecfa6..a26fe57 100644 --- a/integration_test.go +++ b/integration_test.go @@ -44,6 +44,22 @@ func TestWithWrongCredentials(t *testing.T) { } } +func TestGetCurrentLoggedUser(t *testing.T) { + client := miniflux.NewClient(testBaseURL, testAdminUsername, testAdminPassword) + user, err := client.Me() + if err != nil { + t.Fatal(err) + } + + if user.ID == 0 { + t.Fatalf(`Invalid userID, got %q`, user.ID) + } + + if user.Username != testAdminUsername { + t.Fatalf(`Invalid username, got %q`, user.Username) + } +} + func TestGetUsers(t *testing.T) { client := miniflux.NewClient(testBaseURL, testAdminUsername, testAdminPassword) users, err := client.Users() |