diff test/controllers/tweets_controller_test.rb @ 55:8f68ca606099

Add twitter id to the url so it'll be consistent. Not sure if there will be use case of "following this id".
author nanaya <me@myconan.net>
date Fri, 03 Jul 2015 01:17:40 +0900
parents 8983c426e256
children 257910c60eb3
line wrap: on
line diff
--- a/test/controllers/tweets_controller_test.rb	Sat Jun 27 14:47:28 2015 +0900
+++ b/test/controllers/tweets_controller_test.rb	Fri Jul 03 01:17:40 2015 +0900
@@ -2,15 +2,20 @@
 
 class TweetsControllerTest < ActionController::TestCase
   test "should get show" do
-    get :show, :id => "edogawa_test", :format => :atom
+    get :show, :id => "2791517370/edogawa_test", :format => :atom
     assert_response :success
   end
 
   test "does not explode on empty timeline" do
-    get :show, :id => "nanaya_t_empty", :format => :atom
+    get :show, :id => "3168319146/nanaya_t_empty", :format => :atom
     assert_response :success
   end
 
+  test "redirect on @handle access" do
+    get :show, :id => "edogawa_test", :format => :atom
+    assert_redirected_to "/2791517370/edogawa_test"
+  end
+
   test "should get index" do
     get :index
     assert_response :success