aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/public_body_heading_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/public_body_heading_spec.rb')
-rw-r--r--spec/models/public_body_heading_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/models/public_body_heading_spec.rb b/spec/models/public_body_heading_spec.rb
index 73b5167fb..ec5c3ad2c 100644
--- a/spec/models/public_body_heading_spec.rb
+++ b/spec/models/public_body_heading_spec.rb
@@ -5,9 +5,23 @@
# id :integer not null, primary key
# locale :string
# name :text not null
+# display_order :integer
#
require 'spec_helper'
describe PublicBodyHeading do
+ before do
+ load_test_categories
+ end
+
+ describe 'when loading the data' do
+ 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 1
+ headings[1].name.should eq 'Miscellaneous'
+ headings[1].display_order.should eq 2
+ end
+ end
end