aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/body_controller_spec.rb
diff options
context:
space:
mode:
authorfrancis <francis>2007-10-31 12:39:58 +0000
committerfrancis <francis>2007-10-31 12:39:58 +0000
commitaf4055e002f7d9b12ec492e1a9b78a6a6aff5bb3 (patch)
treef59c9c1c0871bb03a7af1472bda6a67cc469005e /spec/controllers/body_controller_spec.rb
parentc023cfab330de526892126ae722d7bfcc1d22c96 (diff)
Tests for some controllers.
Diffstat (limited to 'spec/controllers/body_controller_spec.rb')
-rw-r--r--spec/controllers/body_controller_spec.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/controllers/body_controller_spec.rb b/spec/controllers/body_controller_spec.rb
new file mode 100644
index 000000000..bf73a6e19
--- /dev/null
+++ b/spec/controllers/body_controller_spec.rb
@@ -0,0 +1,23 @@
+require File.dirname(__FILE__) + '/../spec_helper'
+
+describe BodyController, "when showing a body" do
+ fixtures :public_bodies
+
+ it "should be successful" do
+ get :show, :simple_short_name => "dfh"
+ response.should be_success
+ end
+
+ it "should render with 'show' template" do
+ get :show, :simple_short_name => "dfh"
+ response.should render_template('show')
+ end
+
+ it "should assign the body" do
+ get :show, :simple_short_name => "dfh"
+ assigns[:public_bodies].should == [ public_bodies(:humpadink_public_body) ]
+ end
+
+ # XXX test for 404s when don't give valid name
+ # XXX test the fancy history searching stuff
+end