aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-09-24 12:21:47 +0100
committerLouise Crow <louise.crow@gmail.com>2014-09-24 13:29:53 +0100
commit0eeed68a2c5bfdf4d5404e5191bed4c0c11eda60 (patch)
treea5e1cdf7188a52ffb276f71c07f623cf97b4bb35 /spec/models
parent03471adfe714994524a07c9d99fc38ae9bddfa5c (diff)
fixup! Remove dependence on default public bodies.
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/public_body_category_link_spec.rb6
-rw-r--r--spec/models/public_body_heading_spec.rb6
2 files changed, 6 insertions, 6 deletions
diff --git a/spec/models/public_body_category_link_spec.rb b/spec/models/public_body_category_link_spec.rb
index 7108f124b..5964a164e 100644
--- a/spec/models/public_body_category_link_spec.rb
+++ b/spec/models/public_body_category_link_spec.rb
@@ -17,7 +17,7 @@ describe PublicBodyHeading, 'when validating' do
category_link = PublicBodyCategoryLink.new(:public_body_heading => heading,
:public_body_category => category)
category_link.valid?
- category_link.category_display_order.should == PublicBodyCategoryLink.next_display_order(heading_with_no_categories)
+ category_link.category_display_order.should == PublicBodyCategoryLink.next_display_order(heading)
end
end
@@ -25,8 +25,8 @@ end
describe PublicBodyCategoryLink, 'when setting a category display order' do
it 'should return 0 if there are no public body headings' do
- heading_with_no_categories = FactoryGirl.create(:heading_with_no_categories)
- PublicBodyCategoryLink.next_display_order(heading_with_no_categories).should == 0
+ heading = FactoryGirl.create(:public_body_heading)
+ PublicBodyCategoryLink.next_display_order(heading).should == 0
end
it 'should return one more than the highest display order if there are public body headings' do
diff --git a/spec/models/public_body_heading_spec.rb b/spec/models/public_body_heading_spec.rb
index 5e581e713..dd0517072 100644
--- a/spec/models/public_body_heading_spec.rb
+++ b/spec/models/public_body_heading_spec.rb
@@ -37,7 +37,7 @@ describe PublicBodyHeading do
end
it 'should require a unique name' do
- heading = FactoryGirl.create(:silly_heading)
+ heading = FactoryGirl.create(:public_body_heading)
new_heading = PublicBodyHeading.new(:name => heading.name)
new_heading.should_not be_valid
new_heading.errors[:name].should == ["Name is already taken"]
@@ -57,8 +57,8 @@ describe PublicBodyHeading do
end
it 'should return one more than the highest display order if there are public body headings' do
- heading = FactoryGirl.create(:popular_heading)
- PublicBodyHeading.next_display_order.should == 2
+ heading = FactoryGirl.create(:public_body_heading)
+ PublicBodyHeading.next_display_order.should == 1
end
end
end