Fix reverse boltdb list and tests

This commit is contained in:
Bel LaPointe
2018-10-11 08:19:49 -06:00
parent c4d3b24e5c
commit c32ef6c099
4 changed files with 14 additions and 9 deletions

View File

@@ -107,7 +107,7 @@ func (feed *Feed) fromGofeed(gofeed *gofeed.Feed) ([]*Item, error) {
if err != nil {
return nil, err
}
feed.Updated = time.Now().UTC() //*updated
feed.Updated = *updated //time.Now().UTC() //*updated
feed.Title = gofeed.Title
return newitems, nil
}

View File

@@ -22,7 +22,7 @@ func Test_RSSItem(t *testing.T) {
output: Item{
Name: "a",
Link: "b",
Content: `<img src="A"/><br><img src="asdf"/>`,
Content: `<a href="b">a</a><br><img src="A"/><br><img src="asdf"/>`,
},
},
{
@@ -35,7 +35,7 @@ func Test_RSSItem(t *testing.T) {
output: Item{
Name: "a",
Link: "b",
Content: `<img src="asdf"/>`,
Content: `<a href="b">a</a><br><img src="asdf"/>`,
},
},
{
@@ -48,7 +48,7 @@ func Test_RSSItem(t *testing.T) {
output: Item{
Name: "a",
Link: "b",
Content: "",
Content: `<a href="b">a</a><br>`,
},
},
{
@@ -61,7 +61,7 @@ func Test_RSSItem(t *testing.T) {
output: Item{
Name: "a",
Link: "b",
Content: `<img src="asdf"/>`,
Content: `<a href="b">a</a><br><img src="asdf"/>`,
},
},
{
@@ -74,7 +74,7 @@ func Test_RSSItem(t *testing.T) {
output: Item{
Name: "a",
Link: "b",
Content: "x<br>y",
Content: `<a href="b">a</a><br>x<br>y`,
},
},
}