mirror of
https://github.com/derfenix/webarchive.git
synced 2026-03-11 22:40:58 +03:00
Fix reduce network calls count for the target url
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/derfenix/webarchive/config"
|
||||
"github.com/derfenix/webarchive/entity"
|
||||
)
|
||||
|
||||
func TestProcessors_GetMeta(t *testing.T) {
|
||||
@@ -20,7 +21,9 @@ func TestProcessors_GetMeta(t *testing.T) {
|
||||
procs, err := NewProcessors(cfg)
|
||||
require.NoError(t, err)
|
||||
|
||||
meta, err := procs.GetMeta(ctx, "https://habr.com/ru/companies/wirenboard/articles/722718/")
|
||||
cache := entity.NewCache()
|
||||
|
||||
meta, err := procs.GetMeta(ctx, "https://habr.com/ru/companies/wirenboard/articles/722718/", cache)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "Сколько стоит умный дом? Рассказываю, как строил свой и что получилось за 1000 руб./м² / Хабр", meta.Title)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user