Browse Source

Code fixes.

pull/747/head
Sebastian 4 years ago
parent
commit
2e0042c70b
  1. 13
      backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/Builders/AssetFieldBuilder.cs
  2. 2
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/DomainObject/ContentDomainObjectTests.cs

13
backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/Builders/AssetFieldBuilder.cs

@ -5,6 +5,7 @@
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using Squidex.Domain.Apps.Core.Assets;
using Squidex.Domain.Apps.Core.Schemas;
using Squidex.Domain.Apps.Entities.Schemas.Commands;
@ -21,7 +22,17 @@ namespace Squidex.Domain.Apps.Entities.Apps.Templates.Builders
{
Properties<AssetsFieldProperties>(p => p with
{
MustBeImage = true
ExpectedType = AssetType.Image
});
return this;
}
public AssetFieldBuilder MustBe(AssetType type)
{
Properties<AssetsFieldProperties>(p => p with
{
ExpectedType = type
});
return this;

2
backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/DomainObject/ContentDomainObjectTests.cs

@ -797,8 +797,6 @@ namespace Squidex.Domain.Apps.Entities.Contents.DomainObject
[Fact]
public async Task CancelContentSchedule_create_events_and_unset_schedule()
{
var dueTime = Instant.MaxValue;
var command = new CancelContentSchedule();
await ExecuteCreateAsync();

Loading…
Cancel
Save