aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/help_controller_spec.rb
diff options
context:
space:
mode:
authorfrancis <francis>2008-03-21 01:05:12 +0000
committerfrancis <francis>2008-03-21 01:05:12 +0000
commitf251329df107a5833eff33d936262397fdaa4347 (patch)
tree9cc2dd7d76ff148a72a87d644a26f17ab115f75f /spec/controllers/help_controller_spec.rb
parent9249268bd7d3b0585dda7b6a5943d44570aab823 (diff)
Test code for more admin stuff, and help pages, and related HTML fixes.
Diffstat (limited to 'spec/controllers/help_controller_spec.rb')
-rw-r--r--spec/controllers/help_controller_spec.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/controllers/help_controller_spec.rb b/spec/controllers/help_controller_spec.rb
new file mode 100644
index 000000000..2743c9c77
--- /dev/null
+++ b/spec/controllers/help_controller_spec.rb
@@ -0,0 +1,30 @@
+require File.dirname(__FILE__) + '/../spec_helper'
+
+describe HelpController, "when using help" do
+ integrate_views
+
+ it "shows the about page" do
+ get :about
+ end
+
+ it "shows contact form" do
+ get :contact
+ end
+
+ it "sends a contact message" do
+ post :contact, { :contact => {
+ :name => "Vinny Vanilli",
+ :email => "vinny@localhost",
+ :subject => "Why do I have such an ace name?",
+ :message => "You really should know!!!\n\nVinny",
+ }, :submitted_contact_form => 1
+ }
+ response.should redirect_to(:controller => 'general', :action => 'frontpage')
+
+ deliveries = ActionMailer::Base.deliveries
+ deliveries.size.should == 1
+ deliveries[0].body.should include("really should know")
+ end
+
+end
+