public void TeamCanBeUpdatedToChangeName() { var teamModel = new TeamModel { Name = "Team1", Description = "Test Team" }; _repo.Create(teamModel); teamModel.Name = "SonOfTeam1"; _repo.Update(teamModel); Assert.AreEqual("SonOfTeam1", _repo.GetAllTeams().Single().Name); }
public void TeamMemberIsAuthorised() { var user = AddUser(); var repoId = AddRepo("TestRepo"); var team = CreateTeam(); AddTeamToRepo(repoId, team); // Add the member to the team team.Members = new[] { user }; EFTeamRepository teams = new EFTeamRepository { CreateContext = GetContext }; teams.Update(team); Assert.IsTrue(CheckPermission(user.Id, repoId)); }