Forráskód Böngészése

Merge branch 'test'

scossu 2 napja
szülő
commit
b8c6255b1a

+ 0 - 0
test/sample_submission/coll2/.keep → test/assets/sip/coll2/.keep


+ 0 - 0
test/sample_submission/demo_collection/demo_postcard/back/567890.jpg → test/assets/sip/demo_collection/demo_postcard/back/567890.jpg


+ 0 - 0
test/sample_submission/demo_collection/demo_postcard/front/54321.jpg → test/assets/sip/demo_collection/demo_postcard/front/54321.jpg


+ 0 - 0
test/sample_submission/demo_collection/description.md → test/assets/sip/demo_collection/description.md


+ 0 - 0
test/sample_submission/demo_collection/single_image/0685_04.jpg → test/assets/sip/demo_collection/single_image/0685_04.jpg


+ 0 - 0
test/sample_submission/pkar_submission-demo.csv → test/assets/sip/pkar_submission-demo.csv


+ 6 - 0
test/setup_teardown.lua

@@ -0,0 +1,6 @@
+describe("Framework setup and teardown", function ()
+    it("should set up a fresh repo in a nonexisting location", function()
+    end)
+    it("should set up a repo on top of the previous one and clear it", function()
+    end)
+end)

+ 11 - 0
test/site_gen.lua

@@ -0,0 +1,11 @@
+describe("Static site generation", function ()
+    it("should create a new site from the archive", function()
+    end)
+    it("should remove the previous site before creating a new one", function()
+    end)
+    --[[
+    -- TODO check for website internal linking
+    it("should ", function()
+    end)
+    --]]
+end)

+ 55 - 0
test/submission.lua

@@ -0,0 +1,55 @@
+describe("Archive submission process", function()
+    describe("Valid submissions", function()
+        it("should process a basic LL", function()
+        end)
+        it("should create resources with only IDs", function()
+        end)
+        it("should create resources with only source paths", function()
+        end)
+        it("should create resources with IDs & paths and keep the IDs", function()
+        end)
+        it("should create a DRes without a path or ID", function()
+        end)
+        it("should create resources with one multi-valued field", function()
+        end)
+        it("should create resources with multiple multi-valued fields", function()
+        end)
+        it("should process ID references", function()
+        end)
+        it("should process path references", function()
+        end)
+        it("should generate explicit collection members", function()
+        end)
+        it("should generate implicit collection members", function()
+        end)
+    end)
+    describe("Invalid submissions", function()
+        it("should not allow a first row without a content type", function()
+        end)
+        it("should not allow an ID on a row without a content type", function()
+        end)
+        it("should not allow a source path on a row without a content type", function()
+        end)
+        --[[
+        it("should ", function()
+        end)
+        --]]
+    end)
+end)
+
+describe("Submission data validation", function ()
+    it("should allow any number of values without cardinality constraints", function()
+    end)
+    it("should fail if any value is below min cardinality", function()
+    end)
+    it("should fail if any value is above max cardinality", function()
+    end)
+    it("should fail if value cannot be cast to the given data type", function()
+    end)
+    it("should fail if a number is out of range", function()
+    end)
+    it("should fail if a string is out of range", function()
+    end)
+    it("should fail if a relationship is out of range", function()
+    end)
+end)