endpoint_test.go 474 B

123456789101112131415161718192021
  1. // Copyright 2018 Frédéric Guillot. All rights reserved.
  2. // Use of this source code is governed by the Apache 2.0
  3. // license that can be found in the LICENSE file.
  4. // +build integration
  5. package tests
  6. import (
  7. "testing"
  8. miniflux "miniflux.app/client"
  9. )
  10. func TestWithBadEndpoint(t *testing.T) {
  11. client := miniflux.New("bad url", testAdminUsername, testAdminPassword)
  12. _, err := client.Users()
  13. if err == nil {
  14. t.Fatal(`Using a bad URL should raise an error`)
  15. }
  16. }