Kralizek / Assembla.Connector

A .NET Standard wrapper for Assembla REST API.
MIT License
3 stars 2 forks source link

Cannot Copy an existing space #1

Open Kralizek opened 7 years ago

Kralizek commented 7 years ago

When trying to copy an existing space, Assembla API responds with 422 'Unprocessable Entity'

using (var test = await client.CreateDisposableSpace())
{
    var copiedSpace = await client.Spaces.CopyAsync(test.Space.WikiName, new Space { Name = "Copied Space", WikiName = "asd" });
    copiedSpace.ShouldNotBeNull();

    var listAll = await client.Spaces.GetAllAsync();

    listAll.Count(c => c.Id == copiedSpace.Id).ShouldBe(1);

    await client.Spaces.DeleteAsync(copiedSpace.Id);
}

Snippet copied from https://github.com/Kralizek/Assembla.Connector/blob/master/samples/Sample.Assembla.Connector/Samples/SpacesCopySample.cs