mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 02:44:52 +08:00
Retiring ContentItemViewModel
...and all that entails - things like IZone and IZoneCollection are barely roughed in --HG-- branch : theming
This commit is contained in:
@@ -103,7 +103,7 @@ namespace Orchard.Core.Tests.Common.Providers {
|
||||
var item = contentManager.Create<ICommonPart>("test-item", VersionOptions.Draft, init => { });
|
||||
var viewModel = new OwnerEditorViewModel() { Owner = "User" };
|
||||
updateModel.Setup(x => x.TryUpdateModel(viewModel, "", null, null)).Returns(true);
|
||||
contentManager.UpdateEditorShape(item.ContentItem, updateModel.Object);
|
||||
contentManager.UpdateEditorModel(item.ContentItem, updateModel.Object);
|
||||
}
|
||||
|
||||
class UpdatModelStub : IUpdateModel {
|
||||
@@ -142,7 +142,7 @@ namespace Orchard.Core.Tests.Common.Providers {
|
||||
|
||||
var updater = new UpdatModelStub() { Owner = null };
|
||||
|
||||
contentManager.UpdateEditorShape(item.ContentItem, updater);
|
||||
contentManager.UpdateEditorModel(item.ContentItem, updater);
|
||||
}
|
||||
|
||||
[Test, Ignore("Fix pending")]
|
||||
@@ -160,7 +160,7 @@ namespace Orchard.Core.Tests.Common.Providers {
|
||||
|
||||
var updater = new UpdatModelStub() {Owner = ""};
|
||||
|
||||
contentManager.UpdateEditorShape(item.ContentItem, updater);
|
||||
contentManager.UpdateEditorModel(item.ContentItem, updater);
|
||||
|
||||
Assert.That(updater.ModelErrors.ContainsKey("CommonPart.Owner"), Is.True);
|
||||
}
|
||||
|
Reference in New Issue
Block a user