summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-08-31 11:06:39 +0300
committerPaul Buetow <paul@buetow.org>2024-08-31 11:06:39 +0300
commitc1432a3f7fb1d454fbcfa047b0c37a95a16c9e33 (patch)
treebe55010ddcfeaf6ee813754d1ce3f5e79158f153 /internal
parentb923d7fc679901d9724cdd9ba4450e8eea448168 (diff)
fix and so on
Diffstat (limited to 'internal')
-rw-r--r--internal/server/repository/repository_test.go20
-rw-r--r--internal/types/entry_test.go10
2 files changed, 16 insertions, 14 deletions
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 }
}
}
`