mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 10:54:50 +08:00
Implemented RebuildIndex plus UpdateIndex signal to backgroung tasks. Adapted UI.
--HG-- branch : dev
This commit is contained in:
@@ -58,7 +58,11 @@ namespace Orchard.Tests.Indexing {
|
||||
[Test]
|
||||
public void IndexProviderShouldOverwriteAlreadyExistingIndex() {
|
||||
_provider.CreateIndex("default");
|
||||
_provider.CreateIndex("default");
|
||||
_provider.Store("default", _provider.New(1).Add("body", null));
|
||||
Assert.That(_provider.IsEmpty("default"), Is.False);
|
||||
|
||||
_provider.CreateIndex("default");
|
||||
Assert.That(_provider.IsEmpty("default"), Is.True);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -193,5 +197,24 @@ namespace Orchard.Tests.Indexing {
|
||||
_provider.SetLastIndexUtc("default", new DateTime(1901, 1, 1, 1, 1, 1, 1));
|
||||
Assert.That(_provider.GetLastIndexUtc("default"), Is.EqualTo(DefaultIndexProvider.DefaultMinDateTime));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IsEmptyShouldBeTrueForNoneExistingIndexes() {
|
||||
_provider.IsEmpty("dummy");
|
||||
Assert.That(_provider.IsEmpty("default"), Is.True);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IsEmptyShouldBeTrueForJustNewIndexes() {
|
||||
_provider.CreateIndex("default");
|
||||
Assert.That(_provider.IsEmpty("default"), Is.True);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IsEmptyShouldBeFalseWhenThereIsADocument() {
|
||||
_provider.CreateIndex("default");
|
||||
_provider.Store("default", _provider.New(1).Add("body", null));
|
||||
Assert.That(_provider.IsEmpty("default"), Is.False);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user