Skip to content

Commit

Permalink
fix test which was trying to use a PartOfSpeech before it was created
Browse files Browse the repository at this point in the history
  • Loading branch information
hahn-kev committed Jan 14, 2025
1 parent 4890857 commit 46135af
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions backend/FwLite/FwLiteProjectSync.Tests/SyncTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,14 @@ public async Task PartsOfSpeechSyncInEntries()
await fwdataApi.CreatePartOfSpeech(noun);
// Note we do *not* call crdtApi.CreatePartOfSpeech(noun);

var verb = new PartOfSpeech()
{
Id = new Guid("86ff66f6-0774-407a-a0dc-3eeaf873daf7"),
Name = { { "en", "verb" } },
Predefined = true,
};
await crdtApi.CreatePartOfSpeech(verb);

await fwdataApi.CreateEntry(new Entry()
{
LexemeForm = { { "en", "Pear" } },
Expand All @@ -308,10 +316,10 @@ await fwdataApi.CreateEntry(new Entry()
});
await crdtApi.CreateEntry(new Entry()
{
LexemeForm = { { "en", "Banana" } },
LexemeForm = { { "en", "Eat" } },
Senses =
[
new Sense() { Gloss = { { "en", "Banana" } }, PartOfSpeechId = noun.Id }
new Sense() { Gloss = { { "en", "Eat" } }, PartOfSpeechId = verb.Id }
]
});
await _syncService.Sync(crdtApi, fwdataApi);
Expand Down

0 comments on commit 46135af

Please sign in to comment.