Example #1
0
        public async Task AssignRoleToUser()
        {
            var roleName = Util.Methods.MakeString();
            var role     = new CB.CloudRole(roleName);

            role.Set("name", roleName);
            var obj = new CB.CloudUser();

            obj.Set("username", CB.Test.Util.Methods.MakeEmail());
            obj.Set("password", CB.Test.Util.Methods.MakeEmail());
            obj.Set("email", CB.Test.Util.Methods.MakeEmail());
            await obj.SignupAsync();

            await role.SaveAsync();

            await obj.AddToRoleAsync(role);

            Assert.IsTrue(true);
        }