aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrancis <francis>2007-11-08 12:51:04 +0000
committerfrancis <francis>2007-11-08 12:51:04 +0000
commit06252081cd58732c76c14801c3d67c1b3be97dcc (patch)
tree3dc4eabdc99e7341e066ae2d0f4cb557082aa3f2
parenteb521e1f1ea406ccbb3794b81b8a50f558ae0a79 (diff)
Some test stubs to force them into code coverage.
-rw-r--r--spec/controllers/application_spec.rb9
-rw-r--r--spec/controllers/request_controller_spec.rb23
-rw-r--r--spec/models/user_mailer_spec.rb8
3 files changed, 40 insertions, 0 deletions
diff --git a/spec/controllers/application_spec.rb b/spec/controllers/application_spec.rb
new file mode 100644
index 000000000..871672e8e
--- /dev/null
+++ b/spec/controllers/application_spec.rb
@@ -0,0 +1,9 @@
+require File.dirname(__FILE__) + '/../spec_helper'
+
+describe ApplicationController, "when authenticating user" do
+ fixtures :users
+
+# it "blah" do
+# end
+end
+
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index 3a4bc0a36..22965871c 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -1,5 +1,28 @@
require File.dirname(__FILE__) + '/../spec_helper'
+describe RequestController, "when showing the front page" do
+ integrate_views
+ fixtures :users
+
+ it "should be successful" do
+ get :frontpage
+ response.should be_success
+ end
+
+ it "should have sign in/up link when not signed in" do
+ get :frontpage
+ response.should have_tag('a', "Sign in or sign up")
+ end
+
+ it "should have sign out link when signed in" do
+ session[:user] = users(:bob_smith_user)
+ get :frontpage
+ response.should have_tag('a', "Sign out")
+ end
+
+
+end
+
describe RequestController, "when listing all requests" do
fixtures :info_requests
diff --git a/spec/models/user_mailer_spec.rb b/spec/models/user_mailer_spec.rb
new file mode 100644
index 000000000..0682c403f
--- /dev/null
+++ b/spec/models/user_mailer_spec.rb
@@ -0,0 +1,8 @@
+require File.dirname(__FILE__) + '/../spec_helper'
+
+describe UserMailer, " when blah" do
+ before do
+ end
+end
+
+