Skip to content

Commit d2fe660

Browse files
test(DagApiTest): check CID on put
1 parent b7899fe commit d2fe660

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/IpfsApi.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</PropertyGroup>
2828

2929
<ItemGroup>
30-
<PackageReference Include="Ipfs.Core" Version="0.26.0" />
30+
<PackageReference Include="Ipfs.Core" Version="0.27.3" />
3131
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
3232
<PackageReference Include="System.Net.Http" Version="4.3.3" Condition="'$(TargetFramework)' == 'netstandard14'" />
3333
<PackageReference Include="System.Net.Http" Version="4.3.3" Condition="'$(TargetFramework)' == 'net45'" />

test/CoreApi/DagApiTest.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ public async Task PutAndGet_JSON()
2121
var ipfs = TestFixture.Ipfs;
2222
var expected = new JObject();
2323
expected["a"] = "alpha";
24+
var expectedId = "zdpuAyZWTqKMMn76eAAdDoL5nSdwZfSBRn5cSb2L4NALcWcyS";
2425
var id = await ipfs.Dag.PutAsync(expected);
2526
Assert.IsNotNull(id);
27+
Assert.AreEqual(expectedId, (string)id);
2628

2729
var actual = await ipfs.Dag.GetAsync(id);
2830
Assert.IsNotNull(actual);
2931
Assert.AreEqual(expected["a"], actual["a"]);
3032

31-
var value = (string) await ipfs.Dag.GetAsync(id.Encode() + "/a");
33+
var value = (string) await ipfs.Dag.GetAsync(expectedId + "/a");
3234
Assert.AreEqual(expected["a"], value);
3335
}
3436

0 commit comments

Comments
 (0)