aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/public_body_category_spec.rb29
-rw-r--r--spec/models/public_body_heading_spec.rb20
2 files changed, 0 insertions, 49 deletions
diff --git a/spec/models/public_body_category_spec.rb b/spec/models/public_body_category_spec.rb
index 96fe5686b..c16c9b8a1 100644
--- a/spec/models/public_body_category_spec.rb
+++ b/spec/models/public_body_category_spec.rb
@@ -9,35 +9,6 @@
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe PublicBodyCategory do
- describe 'when loading the data' do
- it 'should use the display_order field to preserve the original data order' do
- PublicBodyCategory.add(:en, [
- "Local and regional",
- [ "local_council", "Local councils", "a local council" ],
- "Miscellaneous",
- [ "other", "Miscellaneous", "miscellaneous" ],
- [ "aardvark", "Aardvark", "daft test"],])
-
- headings = PublicBodyHeading.all
- cat_group1 = headings[0].public_body_categories
- cat_group1.count.should eq 1
- cat_group1[0].title.should eq "Local councils"
-
- cat_group2 = headings[1].public_body_categories
- cat_group2.count.should eq 2
- cat_group2[0].title.should eq "Miscellaneous"
- cat_group2[0].public_body_category_links.where(
- :public_body_heading_id => headings[1].id).
- first.
- category_display_order.should eq 0
-
- cat_group2[1].title.should eq "Aardvark"
- cat_group2[1].public_body_category_links.where(
- :public_body_heading_id => headings[1].id).
- first.
- category_display_order.should eq 1
- end
- end
context 'when validating' do
diff --git a/spec/models/public_body_heading_spec.rb b/spec/models/public_body_heading_spec.rb
index 9372e0a07..620f7da9c 100644
--- a/spec/models/public_body_heading_spec.rb
+++ b/spec/models/public_body_heading_spec.rb
@@ -10,26 +10,6 @@ require 'spec_helper'
describe PublicBodyHeading do
- context 'when loading the data' do
-
- before do
- PublicBodyCategory.add(:en, [
- "Local and regional",
- [ "local_council", "Local councils", "a local council" ],
- "Miscellaneous",
- [ "other", "Miscellaneous", "miscellaneous" ],])
- end
-
- it 'should use the display_order field to preserve the original data order' do
- headings = PublicBodyHeading.all
- headings[0].name.should eq 'Local and regional'
- headings[0].display_order.should eq 0
- headings[1].name.should eq 'Miscellaneous'
- headings[1].display_order.should eq 1
- end
-
- end
-
context 'when validating' do
it 'should require a name' do