comparison 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
comparison
equal deleted inserted replaced
54:e01fb1aa55a3 55:8f68ca606099
1 require "test_helper" 1 require "test_helper"
2 2
3 class TweetsControllerTest < ActionController::TestCase 3 class TweetsControllerTest < ActionController::TestCase
4 test "should get show" do 4 test "should get show" do
5 get :show, :id => "edogawa_test", :format => :atom 5 get :show, :id => "2791517370/edogawa_test", :format => :atom
6 assert_response :success 6 assert_response :success
7 end 7 end
8 8
9 test "does not explode on empty timeline" do 9 test "does not explode on empty timeline" do
10 get :show, :id => "nanaya_t_empty", :format => :atom 10 get :show, :id => "3168319146/nanaya_t_empty", :format => :atom
11 assert_response :success 11 assert_response :success
12 end
13
14 test "redirect on @handle access" do
15 get :show, :id => "edogawa_test", :format => :atom
16 assert_redirected_to "/2791517370/edogawa_test"
12 end 17 end
13 18
14 test "should get index" do 19 test "should get index" do
15 get :index 20 get :index
16 assert_response :success 21 assert_response :success