Some work on permissions (lacks tests)

This commit is contained in:
simon987
2019-02-13 21:54:18 -05:00
parent 4edf354f8d
commit c3e5bd77f7
34 changed files with 650 additions and 273 deletions

View File

@@ -19,6 +19,7 @@ func TestCreateGetProject(t *testing.T) {
Priority: 123,
Motd: "motd",
Public: true,
Hidden: true,
})
id := resp.Id
@@ -59,6 +60,9 @@ func TestCreateGetProject(t *testing.T) {
if getResp.Project.Public != true {
t.Error()
}
if getResp.Project.Hidden != true {
t.Error()
}
}
func TestCreateProjectInvalid(t *testing.T) {
@@ -141,6 +145,7 @@ func TestUpdateProjectValid(t *testing.T) {
Name: "NameB",
Motd: "MotdB",
Public: false,
Hidden: true,
}, pid)
if updateResp.Ok != true {
@@ -164,6 +169,9 @@ func TestUpdateProjectValid(t *testing.T) {
if proj.Project.Priority != 2 {
t.Error()
}
if proj.Project.Hidden != true {
t.Error()
}
}
func TestUpdateProjectInvalid(t *testing.T) {