diff options
author | lizconlan <liz@mysociety.org> | 2014-08-04 18:48:04 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-09-22 12:39:03 +0100 |
commit | 7df6456d69d71e6dba34fbc0d7b3d262d2dc0d38 (patch) | |
tree | 96b34f9e7fbcd7be5fcf0ef0042b10b1b58e222f /spec/models/public_body_heading_spec.rb | |
parent | 31c1f47a6bca88b2be9fb463721fb26698e79f82 (diff) |
Add display order to public body categories and headings
Diffstat (limited to 'spec/models/public_body_heading_spec.rb')
-rw-r--r-- | spec/models/public_body_heading_spec.rb | 14 |
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 |