Added tests for team <-> list relations

This commit is contained in:
konrad 2018-08-29 14:33:04 +02:00 committed by kolaente
parent 98e3d3e884
commit bdff353e78
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
3 changed files with 9 additions and 10 deletions

View file

@ -133,12 +133,11 @@ Teams sind global, d.h. Ein Team kann mehrere Namespaces verwalten.
#### v0.2 #### v0.2
* [x] Listen teilbar * [x] Listen teilbar
* [ ] Mit anderen Nutzern * [ ] Mit anderen Nutzern
* [x] Teams * [x] Teams
* [ ] Mit Link * [ ] Mit Link
* [ ] Offen * [ ] Offen
* [ ] Passwortgeschützt * [ ] Passwortgeschützt
* [x] Rechtemanagement (Und damit Unterscheidung zwischen Ownern und Mitgleidern) * [x] Rechtemanagement (Und damit Unterscheidung zwischen Ownern und Mitgleidern)
* [x] Mange Team members * [x] Mange Team members
* [x] Hinzufügen * [x] Hinzufügen

View file

@ -1,9 +1,9 @@
package models package models
import ( import (
"testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"reflect" "reflect"
"testing"
) )
func TestTeamList(t *testing.T) { func TestTeamList(t *testing.T) {
@ -11,7 +11,7 @@ func TestTeamList(t *testing.T) {
tl := TeamList{ tl := TeamList{
TeamID: 1, TeamID: 1,
ListID: 1, ListID: 1,
Right: TeamRightAdmin, Right: TeamRightAdmin,
} }
// Dummyuser // Dummyuser

View file

@ -1,17 +1,17 @@
package models package models
import ( import (
"testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"reflect" "reflect"
"testing"
) )
func TestTeamNamespace(t *testing.T) { func TestTeamNamespace(t *testing.T) {
// Dummy team <-> namespace relation // Dummy team <-> namespace relation
tn := TeamNamespace{ tn := TeamNamespace{
TeamID: 1, TeamID: 1,
NamespaceID: 1, NamespaceID: 1,
Right: TeamRightAdmin, Right: TeamRightAdmin,
} }
dummyuser, _, err := GetUserByID(1) dummyuser, _, err := GetUserByID(1)