Commit fff7cf5c authored by Arnold Hendriks's avatar Arnold Hendriks

test registerslot fallback

parent aa91bc17
......@@ -293,7 +293,7 @@
<formcomponents namespace="http://www.webhare.net/xmlns/webhare_testsuite/testformcomponents" xmlschema="tests/publisher/forms/data/testformcomponents.xsd"/>
<registerslot name="testsite" tid="module.testsite.title" descriptiontid="module.testsite.description" initialvalue="site::webhare testsuite site" type="site" />
<registerslot name="testslot" title="Test Slot" description="Test Description" initialvalue="whfs::/webhare_testsuite.testfolder/testslot" type="folder" />
<registerslot name="testslot" title="Test Slot" description="Test Description" initialvalue="whfs::/webhare_testsuite.testfolder/testslot" type="folder" fallback="whfs::/webhare_testsuite.testfolder/testslot-fallback"/>
</publisher>
<consilio>
......
......@@ -82,7 +82,7 @@ MACRO TestRegister()
testslotfolder->UpdateMetadata([name := "testslot3"]);
testfw->CommitWork();
TestEq(testslotfolder->id, LookupInWHFSRegister("webhare_testsuite:testslot"), "should follow the new entry after ename");
TestEq(testslotfolder->id, LookupInWHFSRegister("webhare_testsuite:testslot"), "should follow the new entry after rename");
testfw->BeginWork();
testslotfolder->RecycleSelf();
......@@ -95,6 +95,20 @@ MACRO TestRegister()
testfw->CommitWork();
TestEq(testslotfolder->id, LookupInWHFSRegister("webhare_testsuite:testslot"));
testfw->BeginWork();
testslotfolder->DeleteSelf();
OBJECT fallbackfolder := testfw->GetWHFSTestRoot()->CreateFolder([name := "testslot-fallback"]);
testfw->CommitWork();
TestEq(fallbackfolder->id, LookupInWHFSRegister("webhare_testsuite:testslot"));
testfw->BeginWork();
testslotfolder := testfw->GetWHFSTestRoot()->CreateFolder([name := "testslot"]);
testfw->CommitWork();
//should switch over to 'real' location as the fallback isn't actually stored
TestEq(testslotfolder->id, LookupInWHFSRegister("webhare_testsuite:testslot"));
}
MACRO TestOrphans()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment