mirror of
https://github.com/simon987/task_tracker.git
synced 2025-12-13 14:59:03 +00:00
Some work on permissions (lacks tests)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user