diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/public_body_category_spec.rb (renamed from spec/lib/public_body_categories_spec.rb) | 19 | ||||
-rw-r--r-- | spec/models/public_body_heading_spec.rb | 13 |
2 files changed, 28 insertions, 4 deletions
diff --git a/spec/lib/public_body_categories_spec.rb b/spec/models/public_body_category_spec.rb index e53d9a028..9d1105084 100644 --- a/spec/lib/public_body_categories_spec.rb +++ b/spec/models/public_body_category_spec.rb @@ -1,6 +1,17 @@ +# == Schema Information +# +# Table name: public_body_categories +# +# id :integer not null, primary key +# locale :string +# title :text not null +# category_tag :text not null +# description :text not null +# + require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') -describe PublicBodyCategories do +describe PublicBodyCategory do before do load_test_categories @@ -17,7 +28,7 @@ describe PublicBodyCategories do "Miscellaneous", ["other", "Miscellaneous", "miscellaneous"]] - PublicBodyCategories::get().with_headings().should == expected_categories + PublicBodyCategory::get().with_headings().should == expected_categories end end @@ -25,7 +36,7 @@ describe PublicBodyCategories do describe 'when asked for headings' do it 'should return a list of headings' do - PublicBodyCategories::get().headings().should == ['Local and regional', 'Miscellaneous'] + PublicBodyCategory::get().headings().should == ['Local and regional', 'Miscellaneous'] end end @@ -33,7 +44,7 @@ describe PublicBodyCategories do describe 'when asked for tags by headings' do it 'should return a hash of tags keyed by heading' do - PublicBodyCategories::get().by_heading().should == {'Local and regional' => ['local_council'], + PublicBodyCategory::get().by_heading().should == {'Local and regional' => ['local_council'], 'Miscellaneous' => ['other']} end diff --git a/spec/models/public_body_heading_spec.rb b/spec/models/public_body_heading_spec.rb new file mode 100644 index 000000000..73b5167fb --- /dev/null +++ b/spec/models/public_body_heading_spec.rb @@ -0,0 +1,13 @@ +# == Schema Information +# +# Table name: public_body_headings +# +# id :integer not null, primary key +# locale :string +# name :text not null +# + +require 'spec_helper' + +describe PublicBodyHeading do +end |