From c1432a3f7fb1d454fbcfa047b0c37a95a16c9e33 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 31 Aug 2024 11:06:39 +0300 Subject: fix and so on --- internal/server/repository/repository_test.go | 20 +++++++++++--------- internal/types/entry_test.go | 10 +++++----- 2 files changed, 16 insertions(+), 14 deletions(-) (limited to 'internal') diff --git a/internal/server/repository/repository_test.go b/internal/server/repository/repository_test.go index 72bc52d..07b755a 100644 --- a/internal/server/repository/repository_test.go +++ b/internal/server/repository/repository_test.go @@ -261,6 +261,8 @@ func TestRepositoryMergeFromPartner(t *testing.T) { t.Error("expected to have a LinkedIn shared entry") } linkedIn.Is = true + ent.Shared["LinkedIn"] = linkedIn + if err := repo1.Update(ent); err != nil { t.Error(err) } @@ -307,10 +309,10 @@ func makeEntries(t *testing.T) []types.Entry { func makeAnEntry() (types.Entry, error) { entry := ` { - "Body": "Body text here", - "Shared": { - "Mastodon": { "Is": true }, - "LinkedIn": { "Is": false } + "body": "Body text here", + "shared": { + "Mastodon": { "is": true }, + "LinkedIn": { "is": false } } } ` @@ -320,11 +322,11 @@ func makeAnEntry() (types.Entry, error) { func makeAnotherEntry() (types.Entry, error) { entry := ` { - "Body": "Another text here", - "Shared": { - "Mastodon": { "Is": true }, - "LinkedIn": { "Is": true }, - "foo.zone": { "Is": false } + "body": "Another text here", + "shared": { + "Mastodon": { "is": true }, + "LinkedIn": { "is": true }, + "foo.zone": { "is": false } } } ` diff --git a/internal/types/entry_test.go b/internal/types/entry_test.go index fe0a0cd..95d7a8c 100644 --- a/internal/types/entry_test.go +++ b/internal/types/entry_test.go @@ -9,8 +9,8 @@ func oneEntry() (Entry, error) { { "body": "Body text here", "shared": { - "Foo": { "Is": true }, - "Bar": { "Is": false } + "Foo": { "is": true }, + "Bar": { "is": false } } } ` @@ -22,9 +22,9 @@ func anotherEntry() (Entry, error) { { "body": "Body text here", "shared": { - "Foo": { "Is": true }, - "Bar": { "Is": true }, - "Baz": { "Is": false } + "Foo": { "is": true }, + "Bar": { "is": true }, + "Baz": { "is": false } } } ` -- cgit v1.2.3