Skip to content

Commit

Permalink
spec fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vkghub committed Jan 8, 2025
1 parent 6822d81 commit 8b5a3ab
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -522,13 +522,10 @@ module BenefitSponsors

context 'when there are both terminated and active broker staff for an agency' do
let(:person2) {FactoryBot.create(:person)}

before do
FactoryBot.create(:broker_agency_staff_role, broker_agency_profile_id: broker_agency_profile.id, person: person2, broker_agency_profile: broker_agency_profile, aasm_state: 'active')
end
let!(:active_broker_agency_staff_role) { FactoryBot.create(:broker_agency_staff_role, broker_agency_profile_id: broker_agency_profile.id, person: person2, broker_agency_profile: broker_agency_profile, aasm_state: 'broker_agency_terminated') }

it 'should return active broker staff' do
expect(person.reload.broker_agency_staff_roles.count).to eq 2
expect(Person.all_broker_staff_roles.count).to eq 2
expect(Person.staff_for_broker_including_pending(broker_agency_profile).count).to eq 1
end
end
Expand Down

0 comments on commit 8b5a3ab

Please sign in to comment.