{:issue => {:project_id => 1, :subject => 'API test',
:tracker_id => 2, :status_id => 3}}, credentials('jsmith')
end
- issue = Issue.first(:order => 'id DESC')
+ issue = Issue.order('id DESC').first
assert_equal 1, issue.project_id
assert_equal 2, issue.tracker_id
assert_equal 3, issue.status_id
credentials('jsmith')
end
- issue = Issue.first(:order => 'id DESC')
+ issue = Issue.order('id DESC').first
assert_equal 1, issue.project_id
assert_equal 2, issue.tracker_id
assert_equal 3, issue.status_id
end
xml = Hash.from_xml(response.body)
token = xml['upload']['token']
- attachment = Attachment.first(:order => 'id DESC')
+ attachment = Attachment.order('id DESC').first
# create the issue with the upload's token
assert_difference 'Issue.count' do
credentials('jsmith')
assert_response :created
end
- issue = Issue.first(:order => 'id DESC')
+ issue = Issue.order('id DESC').first
assert_equal 1, issue.attachments.count
assert_equal attachment, issue.attachments.first
end
xml = Hash.from_xml(response.body)
token = xml['upload']['token']
- attachment = Attachment.first(:order => 'id DESC')
+ attachment = Attachment.order('id DESC').first
# update the issue with the upload's token
assert_difference 'Journal.count' do