2021-12-14 14:33:19 +01:00
|
|
|
describe 'populate_zones' do
|
2021-12-16 09:49:49 +01:00
|
|
|
let(:rake_task) { Rake::Task['zones:populate_zones'] }
|
2021-12-14 14:33:19 +01:00
|
|
|
subject(:run_task) do
|
|
|
|
rake_task.invoke
|
|
|
|
end
|
2021-12-21 10:49:36 +01:00
|
|
|
after(:each) do
|
|
|
|
rake_task.reenable
|
|
|
|
end
|
2021-12-14 14:33:19 +01:00
|
|
|
|
|
|
|
it 'populates zones' do
|
|
|
|
run_task
|
|
|
|
expect(Zone.find_by(acronym: 'PM').label).to eq "Premier ministre"
|
|
|
|
end
|
|
|
|
end
|