diff --git a/Kontent.Ai.Management.Tests/Data/Space/ModifySpace_Replace_ModifiesSpace.json b/Kontent.Ai.Management.Tests/Data/Space/ModifySpace_Replace_ModifiesSpace.json index 931c8c1d..8e96cfd5 100644 --- a/Kontent.Ai.Management.Tests/Data/Space/ModifySpace_Replace_ModifiesSpace.json +++ b/Kontent.Ai.Management.Tests/Data/Space/ModifySpace_Replace_ModifiesSpace.json @@ -4,5 +4,9 @@ "name": "New space name", "web_spotlight_root_item": { "id": "1024356f-858f-421a-b804-07c6bfe10ce5" - } + }, + "collections": [ + { "id": "b38269bf-873c-4021-99ee-e63c7850a505" }, + { "id": "d884b892-4aef-4cd0-8910-68887f69d280" } + ] } \ No newline at end of file diff --git a/Kontent.Ai.Management.Tests/Data/Space/Space.json b/Kontent.Ai.Management.Tests/Data/Space/Space.json index 3abe29cb..85cd395b 100644 --- a/Kontent.Ai.Management.Tests/Data/Space/Space.json +++ b/Kontent.Ai.Management.Tests/Data/Space/Space.json @@ -4,5 +4,9 @@ "name": "Space 1", "web_spotlight_root_item": { "id": "1024356f-858f-421a-b804-07c6bfe10ce5" - } + }, + "collections": [ + { "id": "cfa0dbac-436f-4e15-865b-6a1795523e80" }, + { "id": "d884b892-4aef-4cd0-8910-68887f69d280" } + ] } \ No newline at end of file diff --git a/Kontent.Ai.Management.Tests/ManagementClientTests/SpaceTests.cs b/Kontent.Ai.Management.Tests/ManagementClientTests/SpaceTests.cs index 536961ee..d10bbac1 100644 --- a/Kontent.Ai.Management.Tests/ManagementClientTests/SpaceTests.cs +++ b/Kontent.Ai.Management.Tests/ManagementClientTests/SpaceTests.cs @@ -23,7 +23,8 @@ public async void CreateSpace_CreatesSpace() var createModel = new SpaceCreateModel { Codename = expected.Codename, Name = expected.Name, - WebSpotlightRootItem = expected.WebSpotlightRootItem + WebSpotlightRootItem = expected.WebSpotlightRootItem, + Collections = expected.Collections }; var response = await client.CreateSpaceAsync(createModel); @@ -105,7 +106,11 @@ public async void ModifySpace_Replace_ModifiesSpace() { new() { PropertyName = PropertyName.Name, Value = "New space name" }, new() { PropertyName = PropertyName.Codename, Value = "new_space_codename" }, - new() { PropertyName = PropertyName.WebSpotlightRootItem, Value = identifier } + new() { PropertyName = PropertyName.WebSpotlightRootItem, Value = identifier }, + new() { PropertyName = PropertyName.Collections, Value = new[] { + Reference.ByCodename("collection_codename"), + Reference.ById(Guid.NewGuid()) } + } }; var response = await client.ModifySpaceAsync(identifier, changes);