test(trust): red for #27 — stranger gating, open-request claim, directed claims
This commit is contained in:
1 parent
b43294341d
commit
c23fcdd73c
3 files changed
+135
-2
No files matched your search
+4
-2
@@ -32,8 +32,9 @@ func newRecordServer(t *testing.T) (*httptest.Server, *Server, *recordBrain) {
|
||||
}
|
||||
|
||||
func TestConspiracyInvitesDistinctLenses(t *testing.T) {
|
||||
ts, _, rb := newRecordServer(t)
|
||||
ts, srv, rb := newRecordServer(t)
|
||||
id := newNest(t, ts, "Lab", `"Hugin","Munin","Soot"`)
|
||||
promote(srv, "Hugin", "Munin", "Soot") // earned the right to take open work
|
||||
code, req := post(t, ts.URL+"/api/nests/"+id+"/messages",
|
||||
`{"author":"owner","kind":"request","mode":"conspiracy","text":"is this launch risky"}`)
|
||||
if code != http.StatusCreated || req["mode"] != "conspiracy" {
|
||||
@@ -68,8 +69,9 @@ func TestConspiracyInvitesDistinctLenses(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestConspiracyInviteCapped(t *testing.T) {
|
||||
ts, _, rb := newRecordServer(t)
|
||||
ts, srv, rb := newRecordServer(t)
|
||||
id := newNest(t, ts, "Wide", strings.Join(quoteAll(roster), ","))
|
||||
promote(srv, roster...)
|
||||
code, out := post(t, ts.URL+"/api/nests/"+id+"/messages",
|
||||
`{"author":"owner","kind":"request","mode":"conspiracy","invited":4,"text":"risk"}`)
|
||||
if code != http.StatusCreated {
|
||||
|
||||
Reference in new issue
Block a user