aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/public_body_controller_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-12-03 09:22:41 +0000
committerLouise Crow <louise.crow@gmail.com>2014-12-03 09:22:41 +0000
commit7414ed478f212be2b48c95fafde15726b348b197 (patch)
tree1d89b90f604b837b097fb4274775c4f3b3a319d6 /spec/controllers/public_body_controller_spec.rb
parent479c9cd4567e2042d00c347f25a411373a6b1df9 (diff)
parentd05082c1cf1ddec789e547b54943f6e7d5bdffc1 (diff)
Merge branch 'release/0.20'0.20.0.0
Conflicts: config/general.yml-example
Diffstat (limited to 'spec/controllers/public_body_controller_spec.rb')
-rw-r--r--spec/controllers/public_body_controller_spec.rb19
1 files changed, 11 insertions, 8 deletions
diff --git a/spec/controllers/public_body_controller_spec.rb b/spec/controllers/public_body_controller_spec.rb
index f64975580..840b4bb28 100644
--- a/spec/controllers/public_body_controller_spec.rb
+++ b/spec/controllers/public_body_controller_spec.rb
@@ -204,16 +204,19 @@ describe PublicBodyController, "when listing bodies" do
end
end
- it "should list a tagged thing on the appropriate list page, and others on the other page, and all still on the all page" do
- load_test_categories
-
- public_bodies(:humpadink_public_body).tag_string = "foo local_council"
-
- get :list, :tag => "local_council"
+ it "should list a tagged thing on the appropriate list page, and others on the other page,
+ and all still on the all page" do
+ category = FactoryGirl.create(:public_body_category)
+ heading = FactoryGirl.create(:public_body_heading)
+ PublicBodyCategoryLink.create(:public_body_heading_id => heading.id,
+ :public_body_category_id => category.id)
+ public_bodies(:humpadink_public_body).tag_string = category.category_tag
+
+ get :list, :tag => category.category_tag
response.should render_template('list')
assigns[:public_bodies].should == [ public_bodies(:humpadink_public_body) ]
- assigns[:tag].should == "local_council"
- assigns[:description].should == "in the category ‘Local councils’"
+ assigns[:tag].should == category.category_tag
+ assigns[:description].should == "in the category ‘#{category.title}’"
get :list, :tag => "other"
response.should render_template('list')