Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
fix(daemon): take drafts from the same document
Browse files Browse the repository at this point in the history
  • Loading branch information
juligasa committed May 17, 2024
1 parent d4d0794 commit 3cd9ef6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backend/daemon/api/documents/v1alpha/documents_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ func TestMerge(t *testing.T) {
})
require.NoError(t, err)

draft, err = api.CreateDraft(ctx, &documents.CreateDraftRequest{})
draft, err = api.CreateDraft(ctx, &documents.CreateDraftRequest{ExistingDocumentId: pub1.Document.Id})
require.NoError(t, err)
updated2 := updateDraft(ctx, t, api, draft.Id, []*documents.DocumentChange{
{Op: &documents.DocumentChange_SetTitle{SetTitle: "Second Doc"}},
Expand All @@ -591,8 +591,9 @@ func TestMerge(t *testing.T) {
DocumentId: updated2.Id,
})
require.NoError(t, err)

require.Equal(t, pub1.Document.Id, pub2.Document.Id)
mergedPub, err := api.MergeChanges(ctx, &documents.MergeChangesRequest{
Id: pub1.Document.Id,
Versions: []string{pub1.Version, pub2.Version},
})
require.NoError(t, err)
Expand Down

0 comments on commit 3cd9ef6

Please sign in to comment.