Added tests to read a list via namespace
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
81f7e82ee7
commit
419e930087
|
@ -106,11 +106,23 @@ func TestList(t *testing.T) {
|
|||
assert.Contains(t, rec.Body.String(), `"title":"Test11"`)
|
||||
})
|
||||
|
||||
t.Run("Shared Via Namespace-Team", func(t *testing.T) {
|
||||
|
||||
t.Run("Shared Via NamespaceTeam readonly", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadOne(nil, map[string]string{"list": "12"})
|
||||
assert.NoError(t, err)
|
||||
assert.Contains(t, rec.Body.String(), `"title":"Test12"`)
|
||||
})
|
||||
t.Run("Shared Via NamespaceTeam write", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadOne(nil, map[string]string{"list": "13"})
|
||||
assert.NoError(t, err)
|
||||
assert.Contains(t, rec.Body.String(), `"title":"Test13"`)
|
||||
})
|
||||
t.Run("Shared Via NamespaceTeam admin", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadOne(nil, map[string]string{"list": "14"})
|
||||
assert.NoError(t, err)
|
||||
assert.Contains(t, rec.Body.String(), `"title":"Test14"`)
|
||||
})
|
||||
|
||||
t.Run("Shared Via Namespace-User", func(t *testing.T) {
|
||||
t.Run("Shared Via NamespaceUser", func(t *testing.T) {
|
||||
|
||||
})
|
||||
})
|
||||
|
|
|
@ -86,3 +86,27 @@
|
|||
namespace_id: 6
|
||||
updated: 0
|
||||
created: 0
|
||||
-
|
||||
id: 12
|
||||
title: Test12
|
||||
description: Lorem Ipsum
|
||||
owner_id: 6
|
||||
namespace_id: 7
|
||||
updated: 0
|
||||
created: 0
|
||||
-
|
||||
id: 13
|
||||
title: Test13
|
||||
description: Lorem Ipsum
|
||||
owner_id: 6
|
||||
namespace_id: 8
|
||||
updated: 0
|
||||
created: 0
|
||||
-
|
||||
id: 14
|
||||
title: Test14
|
||||
description: Lorem Ipsum
|
||||
owner_id: 6
|
||||
namespace_id: 9
|
||||
updated: 0
|
||||
created: 0
|
||||
|
|
|
@ -1,28 +1,42 @@
|
|||
-
|
||||
id: 1
|
||||
- id: 1
|
||||
name: testnamespace
|
||||
description: Lorem Ipsum
|
||||
owner_id: 1
|
||||
updated: 0
|
||||
created: 0
|
||||
-
|
||||
id: 2
|
||||
- id: 2
|
||||
name: testnamespace2
|
||||
description: Lorem Ipsum
|
||||
owner_id: 2
|
||||
updated: 0
|
||||
created: 0
|
||||
-
|
||||
id: 3
|
||||
- id: 3
|
||||
name: testnamespace3
|
||||
description: Lorem Ipsum
|
||||
owner_id: 3
|
||||
updated: 0
|
||||
created: 0
|
||||
-
|
||||
id: 6
|
||||
- id: 6
|
||||
name: testnamespace6
|
||||
description: Lorem Ipsum
|
||||
owner_id: 6
|
||||
updated: 0
|
||||
created: 0
|
||||
- id: 7
|
||||
name: testnamespace7
|
||||
description: Lorem Ipsum
|
||||
owner_id: 6
|
||||
updated: 0
|
||||
created: 0
|
||||
- id: 8
|
||||
name: testnamespace8
|
||||
description: Lorem Ipsum
|
||||
owner_id: 6
|
||||
updated: 0
|
||||
created: 0
|
||||
- id: 9
|
||||
name: testnamespace9
|
||||
description: Lorem Ipsum
|
||||
owner_id: 6
|
||||
updated: 0
|
||||
created: 0
|
||||
|
|
|
@ -19,3 +19,15 @@
|
|||
team_id: 4
|
||||
user_id: 1
|
||||
created: 0
|
||||
-
|
||||
team_id: 5
|
||||
user_id: 1
|
||||
created: 0
|
||||
-
|
||||
team_id: 6
|
||||
user_id: 1
|
||||
created: 0
|
||||
-
|
||||
team_id: 7
|
||||
user_id: 1
|
||||
created: 0
|
||||
|
|
|
@ -11,3 +11,24 @@
|
|||
right: 0
|
||||
updated: 0
|
||||
created: 0
|
||||
|
||||
- id: 3
|
||||
team_id: 5
|
||||
namespace_id: 7
|
||||
right: 0
|
||||
updated: 0
|
||||
created: 0
|
||||
|
||||
- id: 4
|
||||
team_id: 6
|
||||
namespace_id: 8
|
||||
right: 1
|
||||
updated: 0
|
||||
created: 0
|
||||
|
||||
- id: 5
|
||||
team_id: 7
|
||||
namespace_id: 9
|
||||
right: 0
|
||||
updated: 0
|
||||
created: 0
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
-
|
||||
id: 1
|
||||
- id: 1
|
||||
name: testteam1
|
||||
description: Lorem Ipsum
|
||||
created_by_id: 1
|
||||
|
@ -11,4 +10,13 @@
|
|||
created_by_id: 1
|
||||
- id: 4
|
||||
name: testteam4_admin_on_list8
|
||||
created_by_id: 1
|
||||
- id: 5
|
||||
name: testteam2_read_only_on_namespace7
|
||||
created_by_id: 1
|
||||
- id: 6
|
||||
name: testteam3_write_on_namespace8
|
||||
created_by_id: 1
|
||||
- id: 7
|
||||
name: testteam4_admin_on_namespace9
|
||||
created_by_id: 1
|
Loading…
Reference in New Issue