Skip to content

Commit

Permalink
Add test for importer
Browse files Browse the repository at this point in the history
  • Loading branch information
mountolive committed Jan 14, 2025
1 parent fc76532 commit a5ff89b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/services/import_indc_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@
Afghanistan,AFG,First NDC Submitted,11/3/24,https://unfccc.int/NDCREG
Algeria,DZA,First NDC Submitted,12/3/24,https://unfccc.int/NDCREG
END

"#{CW_FILES_PREFIX}indc/NDC_global_emissions.csv" => <<~END,
year,Historical emissions,Current policies scenario,2020 NDCs conditional,2020 NDCs unconditional,2025 NDCs conditional,2025 NDCs unconditional,2C,1.5C
2030,100,56,1,48,3,4,32,24
2031,200,56,1,2,45,47,28,17
END
}

describe ImportIndc do
Expand Down Expand Up @@ -157,6 +163,10 @@
expect { subject }.to change { Indc::Timeline.count }.by(2)
end

it 'Creates new INDC global emissions records' do
expect { subject }.to change { Indc::GlobalEmission.count }.by(2)
end

it 'Creates new adaptation actions' do
subject
# 2 ad_sec_actions + 1 A_Sc_ConAct
Expand Down

0 comments on commit a5ff89b

Please sign in to comment.