annotate test/controllers/tweets_controller_test.rb @ 70:5d61551ad9d6

Update gems
author nanaya <me@myconan.net>
date Tue, 26 Jan 2016 04:41:22 +0900
parents 8f68ca606099
children 257910c60eb3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
157f7fd136fc Double quotes everywhere.
edogawaconan <me@myconan.net>
parents: 15
diff changeset
1 require "test_helper"
15
207917e41964 Add tweets~
edogawaconan <me@myconan.net>
parents:
diff changeset
2
207917e41964 Add tweets~
edogawaconan <me@myconan.net>
parents:
diff changeset
3 class TweetsControllerTest < ActionController::TestCase
207917e41964 Add tweets~
edogawaconan <me@myconan.net>
parents:
diff changeset
4 test "should get show" do
55
8f68ca606099 Add twitter id to the url so it'll be consistent.
nanaya <me@myconan.net>
parents: 48
diff changeset
5 get :show, :id => "2791517370/edogawa_test", :format => :atom
15
207917e41964 Add tweets~
edogawaconan <me@myconan.net>
parents:
diff changeset
6 assert_response :success
207917e41964 Add tweets~
edogawaconan <me@myconan.net>
parents:
diff changeset
7 end
38
9e03bbbb1d43 Move static#index to tweet#index.
edogawaconan <me@myconan.net>
parents: 19
diff changeset
8
48
8983c426e256 Prevent exploding on empty timeline.
nanaya <me@myconan.net>
parents: 38
diff changeset
9 test "does not explode on empty timeline" do
55
8f68ca606099 Add twitter id to the url so it'll be consistent.
nanaya <me@myconan.net>
parents: 48
diff changeset
10 get :show, :id => "3168319146/nanaya_t_empty", :format => :atom
48
8983c426e256 Prevent exploding on empty timeline.
nanaya <me@myconan.net>
parents: 38
diff changeset
11 assert_response :success
8983c426e256 Prevent exploding on empty timeline.
nanaya <me@myconan.net>
parents: 38
diff changeset
12 end
8983c426e256 Prevent exploding on empty timeline.
nanaya <me@myconan.net>
parents: 38
diff changeset
13
55
8f68ca606099 Add twitter id to the url so it'll be consistent.
nanaya <me@myconan.net>
parents: 48
diff changeset
14 test "redirect on @handle access" do
8f68ca606099 Add twitter id to the url so it'll be consistent.
nanaya <me@myconan.net>
parents: 48
diff changeset
15 get :show, :id => "edogawa_test", :format => :atom
8f68ca606099 Add twitter id to the url so it'll be consistent.
nanaya <me@myconan.net>
parents: 48
diff changeset
16 assert_redirected_to "/2791517370/edogawa_test"
8f68ca606099 Add twitter id to the url so it'll be consistent.
nanaya <me@myconan.net>
parents: 48
diff changeset
17 end
8f68ca606099 Add twitter id to the url so it'll be consistent.
nanaya <me@myconan.net>
parents: 48
diff changeset
18
38
9e03bbbb1d43 Move static#index to tweet#index.
edogawaconan <me@myconan.net>
parents: 19
diff changeset
19 test "should get index" do
9e03bbbb1d43 Move static#index to tweet#index.
edogawaconan <me@myconan.net>
parents: 19
diff changeset
20 get :index
9e03bbbb1d43 Move static#index to tweet#index.
edogawaconan <me@myconan.net>
parents: 19
diff changeset
21 assert_response :success
9e03bbbb1d43 Move static#index to tweet#index.
edogawaconan <me@myconan.net>
parents: 19
diff changeset
22 end
15
207917e41964 Add tweets~
edogawaconan <me@myconan.net>
parents:
diff changeset
23 end