Mercurial > rsstweet
annotate test/controllers/tweets_controller_test.rb @ 251:43cbceac80ab
Remove model test and add client test
author | nanaya <me@nanaya.net> |
---|---|
date | Mon, 17 Jul 2023 20:54:04 +0900 |
parents | e6c29d47192b |
children |
rev | line source |
---|---|
19 | 1 require "test_helper" |
15 | 2 |
3 class TweetsControllerTest < ActionController::TestCase | |
4 test "should get show" do | |
182 | 5 get :show, :params => { :id => "2791517370", :name => "edogawa_test", :format => :atom } |
15 | 6 assert_response :success |
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 |
230
e6c29d47192b
Update with non-suspended empty account (wat)
nanaya <me@nanaya.pro>
parents:
227
diff
changeset
|
10 get :show, :params => { :id => "1519673756624379905", :name => "nanaya_empty2", :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 |
182 | 15 get :redirect, :params => { :name => "edogawa_test", :format => :atom } |
55
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 | 23 end |