Update middleware test

Assert that `isAnonymous` is set for `SignedInUser`
authenticated via API key.
This commit is contained in:
Sofia Papagiannaki 2019-07-24 14:12:48 +03:00
parent 9fcc4e67f5
commit 75f767e58d

View File

@ -187,6 +187,8 @@ func TestMiddlewareContext(t *testing.T) {
Convey("Should init middleware context", func() {
So(sc.context.IsSignedIn, ShouldEqual, true)
So(sc.context.SignedInUser, ShouldNotBeNil)
So(sc.context.SignedInUser.IsAnonymous, ShouldEqual, true)
So(sc.context.OrgId, ShouldEqual, 12)
So(sc.context.OrgRole, ShouldEqual, models.ROLE_EDITOR)
})