Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
asmega committed Oct 24, 2024
1 parent cd54613 commit 39775c5
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions spec/models/eligible_fe_providers_importer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,32 @@ def to_row(hash)
end
end
end

context "when currency values has GBP symbols and thousand separators" do
before do
file.write correct_headers

3.times do
file.write to_row(attributes_for(:eligible_fe_provider))
end

file.close
end

it "ignores superfluous characters and imports new records" do
expect { subject.run }.to change { EligibleFeProvider.count }.by(3)
end

context "when there are existing records" do
before do
create(:eligible_fe_provider)
create(:eligible_fe_provider, academic_year: AcademicYear.next)
end

it "deletes them with new records" do
expect { subject.run }.to change { EligibleFeProvider.count }.by(2)
end
end
end
end
end

0 comments on commit 39775c5

Please sign in to comment.