mirror of
https://gitlab.com/commento/commento.git
synced 2025-06-29 22:56:37 -04:00
api,db: add page attributes and thread locking
This commit is contained in:

committed by
Adhityaa Chandrasekar

parent
0a03a2c6fc
commit
299649cea2
@ -56,3 +56,18 @@ func TestCommentNewUpvoted(t *testing.T) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func TestCommentNewThreadLocked(t *testing.T) {
|
||||
failTestOnError(t, setupTestEnv())
|
||||
|
||||
pageNew("example.com", "/path.html")
|
||||
p, _ := pageGet("example.com", "/path.html")
|
||||
p.IsLocked = true
|
||||
pageUpdate(p)
|
||||
|
||||
_, err := commentNew("temp-commenter-hex", "example.com", "/path.html", "root", "**foo**", "approved", time.Now().UTC())
|
||||
if err == nil {
|
||||
t.Errorf("expected error not found creating a new comment on a locked thread")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user