mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-20 20:46:53 +00:00
Crap missed versioning stuff, default to latest but allow specific
This commit is contained in:
10 files changed
+157
-32
No files matched your search
@@ -637,6 +637,16 @@ class TestTemplateVisibility(DirectoriesMixin, TestCase):
|
||||
[self.mine, self.unowned],
|
||||
)
|
||||
|
||||
def test_matching_uses_the_selected_files_content(self):
|
||||
version = DocumentFactory(root_document=self.document, content="Contoso")
|
||||
contoso = self.template("Contoso", match="Contoso")
|
||||
|
||||
self.assertCountEqual(
|
||||
get_templates_for_document(self.document),
|
||||
[self.mine, self.unowned],
|
||||
)
|
||||
self.assertEqual(get_templates_for_document(version), [contoso])
|
||||
|
||||
def test_superuser_owner_can_use_all_visible_templates(self):
|
||||
self.owner.is_superuser = True
|
||||
self.assertCountEqual(
|
||||
|
||||
Reference in new issue
Block a user