瀏覽代碼

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
沒有發現已知的金鑰在資料庫的簽署中 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
}

Loading…
取消
儲存