Skip to content

Commit

Permalink
Add explanation comment to spec
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWalkingLeek committed Jan 17, 2025
1 parent 4ae73ab commit 9f6d72b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/models/memberships/switch_stammsektion_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ def create_role(key, role, owner: person, **attrs)

it "is valid with membership in different section active since today" do
create_role(:matterhorn_mitglieder, "Mitglied", start_on: Time.zone.today)

# This recreates a bug that occured when the valid? method was run twice, resulting in the
# @destroyed variable of of the roles_to_destroy roles being true on the second call and thus showing an unexpected error
# because that variable impacted the role.delete call
expect(switch).to be_valid
expect(switch).to be_valid
end
Expand Down

0 comments on commit 9f6d72b

Please sign in to comment.