Revision 441:cbce1fd3b1b7 test/integration/api_test/.svn/text-base
| 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 |
|
Also available in: Unified diff