From 2d5d761081c26e8145bb381985cef8838c5a7edb Mon Sep 17 00:00:00 2001
From: Harsha Kethineni <harshakethineni@flywheel.io>
Date: Wed, 13 Sep 2017 11:14:59 -0500
Subject: [PATCH] Test for prop group perm update to project w/o permission

---
 test/integration_tests/python/test_propagation.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/test/integration_tests/python/test_propagation.py b/test/integration_tests/python/test_propagation.py
index 735cdb9b..60face13 100644
--- a/test/integration_tests/python/test_propagation.py
+++ b/test/integration_tests/python/test_propagation.py
@@ -212,6 +212,12 @@ def test_add_and_remove_user_group_permission(data_builder, as_admin):
     r = as_admin.post('/groups/' + group + '/permissions', json=payload, params={'propagate': 'true'})
     assert r.ok
 
+    # Add project without default group perms
+    r = as_admin.post('/projects', params={'inherit': 'false'}, json={'label': 'project2', 'group': group})
+    assert r.ok
+    project2 = r.json()['_id']
+
+
     r = as_admin.get('/groups/' + group)
     perms = r.json()['permissions']
     user = get_user_in_perms(perms, user_id)
@@ -248,6 +254,11 @@ def test_add_and_remove_user_group_permission(data_builder, as_admin):
     user = get_user_in_perms(perms, user_id)
     assert r.ok and user and user['access'] == 'rw'
 
+    r = as_admin.get('/projects/' + project2)
+    perms = r.json()['permissions']
+    user = get_user_in_perms(perms, user_id)
+    assert r.ok and user and user['access'] == 'rw'
+
     r = as_admin.get('/sessions/' + session)
     perms = r.json()['permissions']
     user = get_user_in_perms(perms, user_id)
-- 
GitLab