Added tests for team <-> list relations
This commit is contained in:
parent
98e3d3e884
commit
bdff353e78
3 changed files with 9 additions and 10 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue