Skip to content

Commit

Permalink
Adapt extend_roles_for_invoicing_spec for year change
Browse files Browse the repository at this point in the history
  • Loading branch information
amaierhofer committed Dec 27, 2024
1 parent 6338737 commit bde2ee0
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@
context "with role#end_on at date" do
before { person.roles.with_inactive.update_all(end_on: date) }

let(:count) { (date.year == Time.zone.today.year) ? 1 : 3 }

it "doesnt extend the role" do
expect { expect_query_count { extend_roles }.to eq(1) }.not_to change { person_mitglied_role.reload.end_on }
expect { expect_query_count { extend_roles }.to eq(count) }.not_to change { person_mitglied_role.reload.end_on }
end
end

Expand Down

0 comments on commit bde2ee0

Please sign in to comment.