Organization: You can now update the organization user role directly (without removing and readding the organization user). Closes #1899

This commit is contained in:
Torkel Ödegaard
2015-05-01 09:48:07 +02:00
parent b48b11e902
commit e771d8e944
9 changed files with 74 additions and 2 deletions
+13
View File
@@ -80,6 +80,19 @@ func TestAccountDataAccess(t *testing.T) {
So(err, ShouldBeNil)
})
Convey("Can update org user role", func() {
updateCmd := m.UpdateOrgUserCommand{OrgId: ac1.OrgId, UserId: ac2.Id, Role: m.ROLE_ADMIN}
err = UpdateOrgUser(&updateCmd)
So(err, ShouldBeNil)
orgUsersQuery := m.GetOrgUsersQuery{OrgId: ac1.OrgId}
err = GetOrgUsers(&orgUsersQuery)
So(err, ShouldBeNil)
So(orgUsersQuery.Result[1].Role, ShouldEqual, m.ROLE_ADMIN)
})
Convey("Can get logged in user projection", func() {
query := m.GetSignedInUserQuery{UserId: ac2.Id}
err := GetSignedInUser(&query)