Skip to content

Commit

Permalink
Review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljames-dj committed Apr 25, 2024
1 parent bbafdec commit 2a488e0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions spec/models/user_spec.rb
Expand Up @@ -457,10 +457,11 @@
it "#teams and #current_teams return unique team names" do
user = FactoryBot.create(:user)

FactoryBot.create(:team_member, team_id: Team.banned.id, user_id: user.id, start_date: Date.today - 20)
FactoryBot.create(:team_member, team_id: Team.banned.id, user_id: user.id, start_date: Date.today - 10)
FactoryBot.create(:team_member, team_id: Team.wst.id, user_id: user.id, start_date: Date.today - 20, end_date: Date.today - 10)
FactoryBot.create(:team_member, team_id: Team.banned.id, user_id: user.id, start_date: Date.today - 5, end_date: Date.today + 5)
FactoryBot.create(:team_member, team_id: Team.banned.id, user_id: user.id, start_date: Date.today + 6, end_date: Date.today + 10)

expect(user.teams).to match_array [Team.banned]
expect(user.teams).to match_array [Team.wst, Team.banned]
expect(user.current_teams).to match_array [Team.banned]
end

Expand Down

0 comments on commit 2a488e0

Please sign in to comment.