Add test for deleted teamids.txt

This commit is contained in:
John Donaldson 2022-10-21 15:08:28 -07:00
parent e00ee97a98
commit b01a500189
1 changed files with 16 additions and 1 deletions

View File

@ -627,8 +627,23 @@ func TestStateTeamIDs(t *testing.T) {
t.Errorf("Expected to find 0 team ID, found %d (%s), instead", len(teamIDs), teamIDs)
}
}
}
func TestStateDeleteTeamIDList(t *testing.T) {
s := NewTestState()
s.refresh()
afero.Remove(s, "teamids.txt")
teamIDs, err := s.TeamIDs()
if len(teamIDs) != 0 {
t.Errorf("Expected to find 0 team IDs, found %d (%s), instead", len(teamIDs), teamIDs)
}
if err == nil {
t.Errorf("Did not receive expected error for non-existent teamids.txt")
}
}
func TestStateTeamNames(t *testing.T) {