From 349016c44d151e72b296e9a363b91dd6fc599fa6 Mon Sep 17 00:00:00 2001 From: Maria Lorena Rodriguez Viruel Date: Fri, 20 Oct 2023 13:18:36 -0300 Subject: [PATCH] Add useviews model tests --- models/brac/useviews/useviews.yml | 12 ++++++++++++ models/brac/views/views.yml | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/models/brac/useviews/useviews.yml b/models/brac/useviews/useviews.yml index f5bb79d8..0d7d9f97 100644 --- a/models/brac/useviews/useviews.yml +++ b/models/brac/useviews/useviews.yml @@ -1,6 +1,18 @@ version: 2 models: + - name: useview_postnatal_care + columns: + - name: uuid + tests: + - not_null + - unique + - relationships: + to: ref('couchdb') + field: doc ->> '_id' + - name: form + tests: + - not_null - name: useview_pregnancy columns: - name: uuid diff --git a/models/brac/views/views.yml b/models/brac/views/views.yml index de07591a..6319e02c 100644 --- a/models/brac/views/views.yml +++ b/models/brac/views/views.yml @@ -10,3 +10,11 @@ models: - relationships: to: ref('useview_pregnancy') field: uuid + - name: reported_by + tests: + - not_null + - name: form + tests: + - not_null + - accepted_values: + values: [pregnancy]