diff options
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/public_body_category_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/models/public_body_category_spec.rb b/spec/models/public_body_category_spec.rb index 9ec99e395..8c0adbcc6 100644 --- a/spec/models/public_body_category_spec.rb +++ b/spec/models/public_body_category_spec.rb @@ -35,6 +35,12 @@ describe PublicBodyCategory do it 'should return a list of headings' do PublicBodyCategory::get().headings().should == ['Local and regional', 'Miscellaneous'] end + + it 'should call load_categories if categories are not already loaded' do + PublicBodyCategory.stub!(:count).and_return(0) + PublicBodyCategory.should_receive(:load_categories) + PublicBodyCategory::get() + end end describe 'when asked for tags by headings' do |