Skip to content

Commit

Permalink
feat: Upgrade the Contentful nuget package to 7.3.0
Browse files Browse the repository at this point in the history
Merge pull request #273 from DFE-Digital/feat/update-contentful-package
  • Loading branch information
killij authored Sep 20, 2023
2 parents 7b74f2a + 5f58006 commit 261b7a6
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="contentful.csharp" Version="7.2.12" />
<PackageReference Include="FluentAssertions" Version="6.11.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.16" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,5 +366,25 @@ public void Calls_Base_SyncNextResult()
_contentfulClient.Received().SyncNextResult(Arg.Any<string>(), default);
}

[Test]
public void Calls_Base_GetTag()
{
// act
_cpdClient.GetTag(string.Empty, default);

// assert
_contentfulClient.Received().GetTag(Arg.Any<string>(), default);
}

[Test]
public void Calls_Base_GetTags()
{
// act
_cpdClient.GetTags(string.Empty, default);

// assert
_contentfulClient.Received().GetTags(Arg.Any<string>(), default);
}

#endregion
}
2 changes: 1 addition & 1 deletion Childrens-Social-Care-CPD/Childrens-Social-Care-CPD.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<InternalsVisibleTo Include="Childrens-Social-Care-CPD-Tests" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="contentful.aspnetcore" Version="7.2.12" />
<PackageReference Include="contentful.aspnetcore" Version="7.3.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="7.0.11" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
Expand Down
10 changes: 10 additions & 0 deletions Childrens-Social-Care-CPD/Contentful/CpdContentfulClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,16 @@ public Task<Space> GetSpace(CancellationToken cancellationToken = default)
return _client.GetSpace(cancellationToken);
}

public Task<ContentTag> GetTag(string tagId, CancellationToken cancellationToken = default)
{
return _client.GetTag(tagId, cancellationToken);
}

public Task<IEnumerable<ContentTag>> GetTags(string queryString = "", CancellationToken cancellationToken = default)
{
return _client.GetTags(queryString, cancellationToken);
}

public Task<SyncResult> SyncInitial(SyncType syncType = SyncType.All, string contentTypeId = "", CancellationToken cancellationToken = default, int? limit = null)
{
return _client.SyncInitial(syncType, contentTypeId, cancellationToken, limit);
Expand Down

0 comments on commit 261b7a6

Please sign in to comment.