Files
csharp/tests/KubernetesClient.Tests/JsonPatchTests.cs
idubnori f67aaec566 Fix - Not applied patch if path contains Uppercase (#330)
* Add JsonPatchTests

* Upgrade JsonPatch and Json.net, if netstandard2.0 or netcoreapp2.1
2019-12-05 17:42:49 -08:00

20 lines
447 B
C#

using System.Linq;
using k8s.Models;
using Microsoft.AspNetCore.JsonPatch;
using Xunit;
namespace k8s.Tests
{
public class JsonPatchTests
{
[Fact]
public void PathContainsUpperCase()
{
var patch = new JsonPatchDocument<V1HorizontalPodAutoscaler>();
patch.Replace(h => h.Spec.MinReplicas, 1);
Assert.Equal("/spec/minReplicas", patch.Operations.Single().path);
}
}
}