##// END OF EJS Templates
remove hard-coded '.rxml' from "test_index_atom_feed" of functional activities controller test (#6317)...
Toshi MARUYAMA -
r7365:0f160628f64d
parent child
Show More
@@ -1,86 +1,86
1 1 require File.expand_path('../../test_helper', __FILE__)
2 2
3 3 class ActivitiesControllerTest < ActionController::TestCase
4 4 fixtures :all
5 5
6 6 def test_project_index
7 7 get :index, :id => 1, :with_subprojects => 0
8 8 assert_response :success
9 9 assert_template 'index'
10 10 assert_not_nil assigns(:events_by_day)
11 11
12 12 assert_tag :tag => "h3",
13 13 :content => /#{2.days.ago.to_date.day}/,
14 14 :sibling => { :tag => "dl",
15 15 :child => { :tag => "dt",
16 16 :attributes => { :class => /issue-edit/ },
17 17 :child => { :tag => "a",
18 18 :content => /(#{IssueStatus.find(2).name})/,
19 19 }
20 20 }
21 21 }
22 22 end
23 23
24 24 def test_previous_project_index
25 25 get :index, :id => 1, :from => 3.days.ago.to_date
26 26 assert_response :success
27 27 assert_template 'index'
28 28 assert_not_nil assigns(:events_by_day)
29 29
30 30 assert_tag :tag => "h3",
31 31 :content => /#{3.day.ago.to_date.day}/,
32 32 :sibling => { :tag => "dl",
33 33 :child => { :tag => "dt",
34 34 :attributes => { :class => /issue/ },
35 35 :child => { :tag => "a",
36 36 :content => /#{Issue.find(1).subject}/,
37 37 }
38 38 }
39 39 }
40 40 end
41 41
42 42 def test_global_index
43 43 get :index
44 44 assert_response :success
45 45 assert_template 'index'
46 46 assert_not_nil assigns(:events_by_day)
47 47
48 48 assert_tag :tag => "h3",
49 49 :content => /#{5.day.ago.to_date.day}/,
50 50 :sibling => { :tag => "dl",
51 51 :child => { :tag => "dt",
52 52 :attributes => { :class => /issue/ },
53 53 :child => { :tag => "a",
54 54 :content => /#{Issue.find(5).subject}/,
55 55 }
56 56 }
57 57 }
58 58 end
59 59
60 60 def test_user_index
61 61 get :index, :user_id => 2
62 62 assert_response :success
63 63 assert_template 'index'
64 64 assert_not_nil assigns(:events_by_day)
65 65
66 66 assert_tag :tag => "h3",
67 67 :content => /#{3.day.ago.to_date.day}/,
68 68 :sibling => { :tag => "dl",
69 69 :child => { :tag => "dt",
70 70 :attributes => { :class => /issue/ },
71 71 :child => { :tag => "a",
72 72 :content => /#{Issue.find(1).subject}/,
73 73 }
74 74 }
75 75 }
76 76 end
77 77
78 78 def test_index_atom_feed
79 79 get :index, :format => 'atom'
80 80 assert_response :success
81 assert_template 'common/feed.atom.rxml'
81 assert_template 'common/feed.atom'
82 82 assert_tag :tag => 'entry', :child => {
83 83 :tag => 'link',
84 84 :attributes => {:href => 'http://test.host/issues/11'}}
85 85 end
86 86 end
General Comments 0
You need to be logged in to leave comments. Login now