Revision 441:cbce1fd3b1b7 test/integration/api_test

View differences:

test/integration/api_test/.svn/all-wcprops
1
K 25
2
svn:wc:ra_dav:version-url
3
V 50
4
/svn/!svn/ver/4729/trunk/test/integration/api_test
5
END
6
token_authentication_test.rb
7
K 25
8
svn:wc:ra_dav:version-url
9
V 79
10
/svn/!svn/ver/4509/trunk/test/integration/api_test/token_authentication_test.rb
11
END
12
users_test.rb
13 1
K 25
14 2
svn:wc:ra_dav:version-url
15 3
V 64
16
/svn/!svn/ver/4729/trunk/test/integration/api_test/users_test.rb
4
/svn/!svn/ver/5946/branches/1.2-stable/test/integration/api_test
17 5
END
18
time_entries_test.rb
19
K 25
20
svn:wc:ra_dav:version-url
21
V 71
22
/svn/!svn/ver/4509/trunk/test/integration/api_test/time_entries_test.rb
23
END
24
http_basic_login_test.rb
25
K 25
26
svn:wc:ra_dav:version-url
27
V 75
28
/svn/!svn/ver/4509/trunk/test/integration/api_test/http_basic_login_test.rb
29
END
30
projects_test.rb
31
K 25
32
svn:wc:ra_dav:version-url
33
V 67
34
/svn/!svn/ver/4645/trunk/test/integration/api_test/projects_test.rb
35
END
36
issues_test.rb
37
K 25
38
svn:wc:ra_dav:version-url
39
V 65
40
/svn/!svn/ver/4509/trunk/test/integration/api_test/issues_test.rb
41
END
42
http_basic_login_with_api_token_test.rb
43
K 25
44
svn:wc:ra_dav:version-url
45
V 90
46
/svn/!svn/ver/4509/trunk/test/integration/api_test/http_basic_login_with_api_token_test.rb
47
END
48
news_test.rb
49
K 25
50
svn:wc:ra_dav:version-url
51
V 63
52
/svn/!svn/ver/4509/trunk/test/integration/api_test/news_test.rb
53
END
54
disabled_rest_api_test.rb
55
K 25
56
svn:wc:ra_dav:version-url
57
V 76
58
/svn/!svn/ver/4509/trunk/test/integration/api_test/disabled_rest_api_test.rb
59
END
test/integration/api_test/.svn/entries
1 1
10
2 2

  
3 3
dir
4
4993
5
http://redmine.rubyforge.org/svn/trunk/test/integration/api_test
4
6000
5
http://redmine.rubyforge.org/svn/branches/1.2-stable/test/integration/api_test
6 6
http://redmine.rubyforge.org/svn
7 7

  
8 8

  
9 9

  
10
2011-01-16T15:23:11.666065Z
11
4729
10
2011-05-29T07:24:15.223638Z
11
5946
12 12
jplang
13 13

  
14 14

  
......
32 32

  
33 33

  
34 34

  
35
2011-03-03T11:05:08.000000Z
35
2011-06-06T13:15:00.000000Z
36 36
7d38bb393dfe949c081c7e9ee2ea0caa
37 37
2010-12-12T23:24:34.194336Z
38 38
4509
......
66 66

  
67 67

  
68 68

  
69
2011-03-03T11:05:08.000000Z
70
5cca5d3e833a26e12978491298f55859
71
2011-01-16T15:23:11.666065Z
72
4729
73
jplang
69
2011-06-06T13:18:32.000000Z
70
7a9592ae362d7037a34c8d52a83bfa94
71
2011-04-01T00:46:29.119996Z
72
5270
73
tmaruyama
74 74
has-props
75 75

  
76 76

  
......
92 92

  
93 93

  
94 94

  
95
9688
95
9690
96 96

97 97
time_entries_test.rb
98 98
file
......
100 100

  
101 101

  
102 102

  
103
2011-03-03T11:05:08.000000Z
104
1704d0f93701094c0ebf95183e078b5f
105
2010-12-12T23:24:34.194336Z
106
4509
107
jbbarth
103
2011-06-06T13:18:32.000000Z
104
f3362e09e4ef210beddc057c74493b74
105
2011-05-29T07:24:15.223638Z
106
5946
107
jplang
108 108
has-props
109 109

  
110 110

  
......
126 126

  
127 127

  
128 128

  
129
5254
129
5607
130 130

131 131
http_basic_login_test.rb
132 132
file
......
134 134

  
135 135

  
136 136

  
137
2011-03-03T11:05:08.000000Z
137
2011-06-06T13:15:00.000000Z
138 138
92abe10e190b64c60afc90866336aa7c
139 139
2010-12-12T23:24:34.194336Z
140 140
4509
......
168 168

  
169 169

  
170 170

  
171
2011-03-03T11:05:08.000000Z
171
2011-06-06T13:15:00.000000Z
172 172
31d08ba85b57fcdb41e06c1f367de87e
173 173
2011-01-06T20:36:31.826591Z
174 174
4645
......
202 202

  
203 203

  
204 204

  
205
2011-03-03T11:05:08.000000Z
205
2011-06-06T13:15:00.000000Z
206 206
a4c38f734c93d99d52de27d41a380756
207 207
2010-12-12T23:24:34.194336Z
208 208
4509
......
236 236

  
237 237

  
238 238

  
239
2011-03-03T11:05:08.000000Z
239
2011-06-06T13:15:00.000000Z
240 240
445e18c4a9d648b99d948eac4e750480
241 241
2010-12-12T23:24:34.194336Z
242 242
4509
......
270 270

  
271 271

  
272 272

  
273
2011-03-03T11:05:08.000000Z
273
2011-06-06T13:15:00.000000Z
274 274
bee85bcaab5d8fb5f90a64ad4ac32e3c
275 275
2010-12-12T23:24:34.194336Z
276 276
4509
......
304 304

  
305 305

  
306 306

  
307
2011-03-03T11:05:08.000000Z
307
2011-06-06T13:15:00.000000Z
308 308
24e8e5b1544016befedeea49b8fb5cb5
309 309
2010-12-12T23:24:34.194336Z
310 310
4509
test/integration/api_test/.svn/text-base/time_entries_test.rb.svn-base
32 32
      assert_tag :tag => 'time_entries',
33 33
        :child => {:tag => 'time_entry', :child => {:tag => 'id', :content => '2'}}
34 34
    end
35
    
36
    context "with limit" do
37
      should "return limited results" do
38
        get '/time_entries.xml?limit=2', {}, :authorization => credentials('jsmith')
39
        assert_response :success
40
        assert_equal 'application/xml', @response.content_type
41
        assert_tag :tag => 'time_entries',
42
          :children => {:count => 2}
43
      end
44
    end
35 45
  end
36 46
  
37 47
  context "GET /time_entries/2.xml" do
test/integration/api_test/.svn/text-base/users_test.rb.svn-base
141 141
            
142 142
          assert_response :unprocessable_entity
143 143
          assert_equal 'application/xml', @response.content_type
144
          assert_tag 'errors', :child => {:tag => 'error', :content => "Firstname can't be blank"}
144
          assert_tag 'errors', :child => {:tag => 'error', :content => "First name can't be blank"}
145 145
        end
146 146
      end
147 147
      
......
226 226
            
227 227
          assert_response :unprocessable_entity
228 228
          assert_equal 'application/xml', @response.content_type
229
          assert_tag 'errors', :child => {:tag => 'error', :content => "Firstname can't be blank"}
229
          assert_tag 'errors', :child => {:tag => 'error', :content => "First name can't be blank"}
230 230
        end
231 231
      end
232 232
      
test/integration/api_test/time_entries_test.rb
32 32
      assert_tag :tag => 'time_entries',
33 33
        :child => {:tag => 'time_entry', :child => {:tag => 'id', :content => '2'}}
34 34
    end
35
    
36
    context "with limit" do
37
      should "return limited results" do
38
        get '/time_entries.xml?limit=2', {}, :authorization => credentials('jsmith')
39
        assert_response :success
40
        assert_equal 'application/xml', @response.content_type
41
        assert_tag :tag => 'time_entries',
42
          :children => {:count => 2}
43
      end
44
    end
35 45
  end
36 46
  
37 47
  context "GET /time_entries/2.xml" do
test/integration/api_test/users_test.rb
141 141
            
142 142
          assert_response :unprocessable_entity
143 143
          assert_equal 'application/xml', @response.content_type
144
          assert_tag 'errors', :child => {:tag => 'error', :content => "Firstname can't be blank"}
144
          assert_tag 'errors', :child => {:tag => 'error', :content => "First name can't be blank"}
145 145
        end
146 146
      end
147 147
      
......
226 226
            
227 227
          assert_response :unprocessable_entity
228 228
          assert_equal 'application/xml', @response.content_type
229
          assert_tag 'errors', :child => {:tag => 'error', :content => "Firstname can't be blank"}
229
          assert_tag 'errors', :child => {:tag => 'error', :content => "First name can't be blank"}
230 230
        end
231 231
      end
232 232
      

Also available in: Unified diff