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. // All rights reserved. Licensed under the MIT license.
// ========================================================================== // ==========================================================================
using Squidex.Domain.Apps.Core.Assets;
using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Core.Schemas;
using Squidex.Domain.Apps.Entities.Schemas.Commands; using Squidex.Domain.Apps.Entities.Schemas.Commands;
@ -21,7 +22,17 @@ namespace Squidex.Domain.Apps.Entities.Apps.Templates.Builders
{ {
Properties<AssetsFieldProperties>(p => p with 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; 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] [Fact]
public async Task CancelContentSchedule_create_events_and_unset_schedule() public async Task CancelContentSchedule_create_events_and_unset_schedule()
{ {
var dueTime = Instant.MaxValue;
var command = new CancelContentSchedule(); var command = new CancelContentSchedule();
await ExecuteCreateAsync(); await ExecuteCreateAsync();

Loading…
Cancel
Save