aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers
diff options
context:
space:
mode:
authortony <tony>2009-03-07 12:22:18 +0000
committertony <tony>2009-03-07 12:22:18 +0000
commit0cc35618e6a6e66c645d12a07558125d51875bb0 (patch)
treefad68731657c619287af14b60f9fbfe0c8044cc9 /spec/controllers
parent643521c34112bf875f811b1ed1de40c6b136d09c (diff)
Display "You" as username in comments you've made.
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/request_controller_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index cc36c4656..64552f18b 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -476,6 +476,25 @@ describe RequestController, "comment alerts" do
end
+describe RequestController, "when viewing comments" do
+ integrate_views
+ fixtures :users
+
+ it "should link to the user who submitted it" do
+ session[:user_id] = users(:bob_smith_user).id
+ get :show, :url_title => 'why_do_you_have_such_a_fancy_dog'
+ response.should have_text(/silly_emnameem.*?>\s+left an annotation/)
+ response.should_not have_text(/You\s+left an annotation/)
+ end
+
+ it "should say if you were the user who submitted it" do
+ session[:user_id] = users(:silly_name_user).id
+ get :show, :url_title => 'why_do_you_have_such_a_fancy_dog'
+ response.should have_text(/You\s+left an annotation/)
+ end
+
+end
+