Browse Source

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
v2
Rob Loranger 1 year ago
parent
commit
7c3a6949d5
No known key found for this signature in database GPG Key ID: D6F1633A4F0903B8
1 changed files with 1 additions and 12 deletions
  1. +1
    -12
      collection_test.go

+ 1
- 12
collection_test.go View File

@@ -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…
Cancel
Save