Преглед на файлове

fixes failing tests

tests were failing on expected write.as blog title
previously the title was 'write.as' and it is now 'write.as blog'

also removed test case ExampleClient_GetCollection as was a duplicate of
TestGetCollection
pull/17/head
Rob Loranger преди 4 години
родител
ревизия
7c3a6949d5
No known key found for this signature in database GPG ключ ID: D6F1633A4F0903B8
променени са 1 файла, в които са добавени 1 реда и са изтрити 12 реда
  1. +1
    -12
      collection_test.go

+ 1
- 12
collection_test.go Целия файл

@@ -15,7 +15,7 @@ func TestGetCollection(t *testing.T) {
t.Errorf("Unexpected fetch results: %+v, err: %v\n", res, err)
} else {
t.Logf("Collection: %+v", res)
if res.Title != "write.as" {
if res.Title != "write.as blog" {
t.Errorf("Unexpected fetch results: %+v\n", res)
}
}
@@ -107,14 +107,3 @@ func TestDeleteCollectionUnauthenticated(t *testing.T) {
t.Fatalf("Error message should be more informative: %v", err)
}
}

func ExampleClient_GetCollection() {
c := NewClient()
coll, err := c.GetCollection("blog")
if err != nil {
fmt.Printf("%v", err)
return
}
fmt.Printf("%s", coll.Title)
// Output: write.as
}

Зареждане…
Отказ
Запис