From 7d91b69e81b946ba6d0695b47b62a371197c73e6 Mon Sep 17 00:00:00 2001
From: Dmitry <b4tm4n@mail.ru>
Date: Wed, 22 Sep 2021 16:28:36 +0300
Subject: [PATCH] add test_api_publication_remove

---
 tests/test_pub1c-rest.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/test_pub1c-rest.py b/tests/test_pub1c-rest.py
index 50fdbed..bf547d6 100644
--- a/tests/test_pub1c-rest.py
+++ b/tests/test_pub1c-rest.py
@@ -183,3 +183,17 @@ def test_api_publication_get(client):
     assert data['url'] == '/1c/test123'
     assert not data['is_file_infobase']
 
+
+def test_api_publication_remove(client):
+    # add publications
+    client.put(path='/api/v1/publications', data={'name': 'test123'})
+    # get
+    response = client.get('/api/v1/publications/test123')
+    assert response.status_code == 200
+    # remove
+    response = client.delete('/api/v1/publications/test123')
+    assert response.status_code == 200
+    # get
+    response = client.get('/api/v1/publications/test123')
+    assert response.status_code == 404
+